|
1 |
| -import { taglistOrderVariants, talgistOrderParser } from '../src/scripts/utils.js'; |
| 1 | +import { taglistOrderVariants, taglistOrderParser } from '../src/scripts/utils.js'; |
2 | 2 | import { DockerRegistryUIError } from '../src/scripts/error.js';
|
3 | 3 | import assert from 'assert';
|
4 | 4 |
|
@@ -36,35 +36,35 @@ describe('utils tests', () => {
|
36 | 36 | });
|
37 | 37 | });
|
38 | 38 |
|
39 |
| - describe('talgistOrderParser', () => { |
| 39 | + describe('taglistOrderParser', () => { |
40 | 40 | it('should have default configuration when empty or undefined', () => {
|
41 | 41 | const expected = { numAsc: true, alphaAsc: true, numFirst: true };
|
42 |
| - assert.deepEqual(talgistOrderParser(), expected); |
43 |
| - assert.deepEqual(talgistOrderParser(''), expected); |
| 42 | + assert.deepEqual(taglistOrderParser(), expected); |
| 43 | + assert.deepEqual(taglistOrderParser(''), expected); |
44 | 44 | });
|
45 | 45 |
|
46 | 46 | it('should parse correctly `num-asc;alpha-asc` and variants', () => {
|
47 | 47 | const expected = { numAsc: true, alphaAsc: true, numFirst: true };
|
48 | 48 | ['asc', 'num-asc;alpha-asc', 'num-asc'].forEach((e) =>
|
49 |
| - assert.deepEqual(talgistOrderParser(e), expected, `wrong result for ${e}`) |
| 49 | + assert.deepEqual(taglistOrderParser(e), expected, `wrong result for ${e}`) |
50 | 50 | );
|
51 | 51 | });
|
52 | 52 |
|
53 | 53 | it('should parse correctly `alpha-desc;num-desc` and variants', () => {
|
54 | 54 | const expected = { numAsc: false, alphaAsc: false, numFirst: false };
|
55 | 55 | ['desc', 'alpha-desc;num-desc'].forEach((e) =>
|
56 |
| - assert.deepEqual(talgistOrderParser(e), expected, `wrong result for ${e}`) |
| 56 | + assert.deepEqual(taglistOrderParser(e), expected, `wrong result for ${e}`) |
57 | 57 | );
|
58 | 58 | });
|
59 | 59 |
|
60 | 60 | it('should parse correctly `alpha-asc;num-desc` and variants', () => {
|
61 | 61 | const expected = { numAsc: false, alphaAsc: true, numFirst: false };
|
62 |
| - assert.deepEqual(talgistOrderParser('alpha-asc;num-desc'), expected) |
| 62 | + assert.deepEqual(taglistOrderParser('alpha-asc;num-desc'), expected) |
63 | 63 | });
|
64 | 64 |
|
65 | 65 | it('should parse correctly `num-desc;alpha-desc` and variants', () => {
|
66 | 66 | const expected = { numAsc: false, alphaAsc: false, numFirst: true };
|
67 |
| - assert.deepEqual(talgistOrderParser('num-desc;alpha-desc'), expected) |
| 67 | + assert.deepEqual(taglistOrderParser('num-desc;alpha-desc'), expected) |
68 | 68 | });
|
69 | 69 | });
|
70 | 70 | });
|
0 commit comments