Skip to content

Commit

Permalink
moved unit & scale tests into separate directories (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
kubikowski authored Nov 9, 2022
1 parent 247d581 commit 996057f
Show file tree
Hide file tree
Showing 28 changed files with 123 additions and 157 deletions.
22 changes: 11 additions & 11 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/* eslint-disable @typescript-eslint/naming-convention */
import type { Config } from 'jest';

/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/

export default {
const config: Config = {
// All imported modules in your tests should be mocked automatically
// automock: false,

Expand Down Expand Up @@ -171,10 +167,10 @@ export default {
// testLocationInResults: false,

// The glob patterns Jest uses to detect test files
testMatch: [
'**/?(*.)function!(.scale).test.ts',
'**/scale.test.ts',
],
// testMatch: [
// '**/?(*.)function!(.scale).test.ts',
// '**/scale.test.ts',
// ],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
Expand All @@ -191,7 +187,9 @@ export default {
// testRunner: "jest-circus/runner",

// A map from regular expressions to paths to transformers
// transform: undefined,
// transform: {
// '^.+\\.ts$': 'ts-jest',
// },

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
Expand All @@ -211,3 +209,5 @@ export default {
// Whether to use watchman for file crawling
// watchman: true,
};

export default config;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"pretest:coverage": "rimraf coverage",
"test": "jest --testPathIgnorePatterns=scale",
"test:coverage": "jest --collect-coverage --testPathIgnorePatterns=scale",
"test:scale": "jest --testPathPattern=scale"
"test:scale": "jest test/scale/scale.test.ts"
},
"dependencies": {},
"devDependencies": {
Expand Down
37 changes: 0 additions & 37 deletions test/scale.test.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { disjoint } from '../../src';
import { disjoint } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function disjointScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('disjoint @ scale', () => {
describe('disjoint ⋅ large sets', () => {
it('disjoint(of1):'.padEnd(padding), () => {
const result = Timer.time('disjoint', () => disjoint(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function disjointScaleTests(): void {
});

afterAll(() => Timer.log('disjoint'));
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { equivalence } from '../../src';
import { equivalence } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function equivalenceScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('equivalence @ scale', () => {
describe('equivalence ⋅ large sets', () => {
it('equivalence(of1):'.padEnd(padding), () => {
const result = Timer.time('equivalence', () => equivalence(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function equivalenceScaleTests(): void {
});

afterAll(() => Timer.log('equivalence'));
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { pairwiseDisjoint } from '../../src';
import { pairwiseDisjoint } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function pairwiseDisjointScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('pairwise disjoint @ scale', () => {
describe('pairwise disjoint ⋅ large sets', () => {
it('pairwiseDisjoint(of1):'.padEnd(padding), () => {
const result = Timer.time('pairwiseDisjoint', () => pairwiseDisjoint(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function pairwiseDisjointScaleTests(): void {
});

afterAll(() => Timer.log('pairwiseDisjoint'));
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { properSubset } from '../../src';
import { properSubset } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function properSubsetScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('proper subset @ scale', () => {
describe('proper subset ⋅ large sets', () => {
it('properSubset(of1):'.padEnd(padding), () => {
const result = Timer.time('properSubset', () => properSubset(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function properSubsetScaleTests(): void {
});

afterAll(() => Timer.log('properSubset'));
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { properSuperset } from '../../src';
import { properSuperset } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function properSupersetScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('proper superset @ scale', () => {
describe('proper superset ⋅ large sets', () => {
it('properSuperset(of1):'.padEnd(padding), () => {
const result = Timer.time('properSuperset', () => properSuperset(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function properSupersetScaleTests(): void {
});

afterAll(() => Timer.log('properSuperset'));
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { subset } from '../../src';
import { subset } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function subsetScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('subset @ scale', () => {
describe('subset ⋅ large sets', () => {
it('subset(of1):'.padEnd(padding), () => {
const result = Timer.time('subset', () => subset(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function subsetScaleTests(): void {
});

afterAll(() => Timer.log('subset'));
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { superset } from '../../src';
import { superset } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function supersetScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('superset @ scale', () => {
describe('superset ⋅ large sets', () => {
it('superset(of1):'.padEnd(padding), () => {
const result = Timer.time('superset', () => superset(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function supersetScaleTests(): void {
});

afterAll(() => Timer.log('superset'));
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { difference } from '../../src';
import { difference } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function differenceScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('difference @ scale', () => {
describe('difference ⋅ large sets', () => {
it('difference(of1):'.padEnd(padding), () => {
const result = Timer.time('difference', () => difference(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function differenceScaleTests(): void {
});

afterAll(() => Timer.log('difference'));
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { intersection } from '../../src';
import { intersection } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function intersectionScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('intersection @ scale', () => {
describe('intersection ⋅ large sets', () => {
it('intersection(of1):'.padEnd(padding), () => {
const result = Timer.time('intersection', () => intersection(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function intersectionScaleTests(): void {
});

afterAll(() => Timer.log('intersection'));
}
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterAll, describe, expect, it, jest } from '@jest/globals';
import { union } from '../../src';
import { union } from '../../../src';
import {
coupleDisjoint,
coupleEquivalent,
Expand All @@ -14,11 +14,10 @@ import {
someDisjoint,
someEquivalent,
times,
} from '../util/scale/scale-testing.constants';
import { Timer } from '../util/scale/timer.model';

export function unionScaleTests(): void {
} from '../../util/scale/scale-testing.constants';
import { Timer } from '../../util/scale/timer.model';

describe('union @ scale', () => {
describe('union ⋅ large sets', () => {
it('union(of1):'.padEnd(padding), () => {
const result = Timer.time('union', () => union(multiplesOf1));
Expand Down Expand Up @@ -105,4 +104,4 @@ export function unionScaleTests(): void {
});

afterAll(() => Timer.log('union'));
}
});
Loading

0 comments on commit 996057f

Please sign in to comment.