mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 01:18:23 +08:00

* [Solution] Project euler challenge 19 with tests * update leap year function * Remove unnecessary, confusingly placed comments * [COMPRESSOR] RLE * [COMPRESSOR] RLE style fixed --------- Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
14 lines
437 B
JavaScript
14 lines
437 B
JavaScript
import { Compress, Decompress } from '../RLE'
|
|
|
|
describe('Test RLE Compressor/Decompressor', () => {
|
|
it('Test - 1, Pass long repetitive strings', () => {
|
|
expect(Compress('AAAAAAAAAAAAAA')).toBe('14A')
|
|
expect(Compress('AAABBQQQQQFG')).toBe('3A2B5Q1F1G')
|
|
})
|
|
|
|
it('Test - 2, Pass compressed strings', () => {
|
|
expect(Decompress('14A')).toBe('AAAAAAAAAAAAAA')
|
|
expect(Decompress('3A2B5Q1F1G')).toBe('AAABBQQQQQFG')
|
|
})
|
|
})
|