Skip to content

Commit 80947ab

Browse files
committed
chore: added placeholder tests
1 parent b0db06e commit 80947ab

File tree

8 files changed

+35
-3
lines changed

8 files changed

+35
-3
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
"lint": "eslint '{src,tests,scripts,benches}/**/*.{js,ts}'",
3333
"lintfix": "eslint '{src,tests,scripts,benches}/**/*.{js,ts}' --fix",
3434
"lint-shell": "find ./src ./tests ./scripts -type f -regextype posix-extended -regex '.*\\.(sh)' -exec shellcheck {} +",
35-
"docs": "shx rm -rf ./docs && typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src",
36-
"bench": "shx rm -rf ./benches/results && ts-node ./benches"
35+
"docs": "shx rm -rf ./docs && typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src"
3736
},
3837
"dependencies": {
3938
"@matrixai/logger": "^4.0.3",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// todo
1+
// Starting project soon ™

tests/global.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* eslint-disable no-var */
2+
3+
/// <reference types="jest-extended" />
4+
5+
/**
6+
* Follows the globals in jest.config.ts
7+
* @module
8+
*/
9+
declare var projectDir: string;
10+
declare var testDir: string;
11+
declare var defaultTimeout: number;
12+
declare var maxTimeout: number;

tests/globalSetup.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
async function setup() {
2+
// eslint-disable-next-line no-console
3+
console.log('\nGLOBAL SETUP');
4+
}
5+
6+
export default setup;

tests/globalTeardown.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
async function teardown() {
2+
// eslint-disable-next-line no-console
3+
console.log('GLOBAL TEARDOWN');
4+
}
5+
6+
export default teardown;

tests/index.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe('index', () => {
2+
test('test', () => {
3+
expect(true).toBeTruthy();
4+
});
5+
});

tests/setup.ts

Whitespace-only changes.

tests/setupAfterEnv.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Default timeout per test
2+
// some tests may take longer in which case you should specify the timeout
3+
// explicitly for each test by using the third parameter of test function
4+
jest.setTimeout(globalThis.defaultTimeout);

0 commit comments

Comments
 (0)