Skip to content

Commit

Permalink
Fix test, / does not exist anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
cpiber committed Aug 8, 2024
1 parent 43fadc3 commit 7c13938
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/unit/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ describe('dot product operations', () => {
});

test('multi-dimensional', () => {
const a1 = [ 1, 2, 3 ];
const a2 = [ 3, 2, 1 ];
const a1 = [1, 2, 3];

Check failure on line 21 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required after '['

Check failure on line 21 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required before ']'
const a2 = [3, 2, 1];

Check failure on line 22 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required after '['

Check failure on line 22 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required before ']'
const d = a1[0] * a2[0] + a1[1] * a2[1] + a1[2] * a2[2];
expect(dot(a1, a2)).toBeCloseTo(d);
});
Expand All @@ -35,7 +35,7 @@ describe('norm (vector square-length)', () => {
});

test('multi-dimensional', () => {
expect(norm([ 1, 2, 3 ])).toBeCloseTo(Math.sqrt(1 * 1 + 2 * 2 + 3 * 3));
expect(norm([1, 2, 3])).toBeCloseTo(Math.sqrt(1 * 1 + 2 * 2 + 3 * 3));

Check failure on line 38 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required after '['

Check failure on line 38 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required before ']'
});
});

Expand All @@ -45,15 +45,15 @@ describe('array occurence', () => {
});

test('only one value', () => {
expect([ 1, 1, 1 ].occurence()).toEqual({ values: [1], occurences: [3] });
expect([1, 1, 1].occurence()).toEqual({ values: [1], occurences: [3] });

Check failure on line 48 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required after '['

Check failure on line 48 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required before ']'
});

test('only one value each', () => {
expect([ 1, 2, 3 ].occurence()).toEqual({ values: [ 1, 2, 3 ], occurences: [ 1, 1, 1 ] });
expect([1, 2, 3].occurence()).toEqual({ values: [1, 2, 3], occurences: [1, 1, 1] });

Check failure on line 52 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required after '['

Check failure on line 52 in tests/unit/shared.ts

View workflow job for this annotation

GitHub Actions / Lint

A space is required before ']'
});

test('interleaving values', () => {
expect([ 3, 1, 2, 1, 3, 3, 2 ].occurence()).toEqual({ values: [ 1, 2, 3 ], occurences: [ 2, 2, 3 ] });
expect([3, 1, 2, 1, 3, 3, 2].occurence()).toEqual({ values: [1, 2, 3], occurences: [2, 2, 3] });
});
});

Expand All @@ -64,11 +64,11 @@ describe('array equality', () => {

test('different items', () => {
expect([1].equals([2])).toBe(false);
expect([ 1, 2, 3 ].equals([ 2, 1, 3 ])).toBe(false);
expect([1, 2, 3].equals([2, 1, 3])).toBe(false);
});

test('same values', () => {
expect([ 1, 2, 3 ].equals([ 1, 2, 3 ])).toBe(true);
expect([1, 2, 3].equals([1, 2, 3])).toBe(true);
});
});

Expand Down Expand Up @@ -137,7 +137,7 @@ describe('other', () => {
});

test('arrFromLengthy lets arrays be', () => {
const test = [ 1, 2, 3 ];
const test = [1, 2, 3];
expect(arrFromLengthy(test)).toEqual(test);
});
});
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('page matchers', () => {
expect(isVideoListPage()).toBe(true);
window.location.pathname = '/myshows';
expect(isVideoListPage()).toBe(true);
window.location.pathname = '/';
window.location.pathname = '/featured';
expect(isVideoListPage()).toBe(true);

window.location.pathname = '/videos/test';
Expand Down

0 comments on commit 7c13938

Please sign in to comment.