Skip to content

Commit

Permalink
chore: added placeholder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aryanjassal committed Feb 12, 2025
1 parent b0db06e commit 80947ab
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 3 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"lint": "eslint '{src,tests,scripts,benches}/**/*.{js,ts}'",
"lintfix": "eslint '{src,tests,scripts,benches}/**/*.{js,ts}' --fix",
"lint-shell": "find ./src ./tests ./scripts -type f -regextype posix-extended -regex '.*\\.(sh)' -exec shellcheck {} +",
"docs": "shx rm -rf ./docs && typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src",
"bench": "shx rm -rf ./benches/results && ts-node ./benches"
"docs": "shx rm -rf ./docs && typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src"
},
"dependencies": {
"@matrixai/logger": "^4.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// todo
// Starting project soon ™
12 changes: 12 additions & 0 deletions tests/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable no-var */

/// <reference types="jest-extended" />

/**
* Follows the globals in jest.config.ts
* @module
*/
declare var projectDir: string;
declare var testDir: string;
declare var defaultTimeout: number;
declare var maxTimeout: number;
6 changes: 6 additions & 0 deletions tests/globalSetup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
async function setup() {
// eslint-disable-next-line no-console
console.log('\nGLOBAL SETUP');
}

export default setup;
6 changes: 6 additions & 0 deletions tests/globalTeardown.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
async function teardown() {
// eslint-disable-next-line no-console
console.log('GLOBAL TEARDOWN');
}

export default teardown;
5 changes: 5 additions & 0 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('index', () => {
test('test', () => {
expect(true).toBeTruthy();
});
});
Empty file added tests/setup.ts
Empty file.
4 changes: 4 additions & 0 deletions tests/setupAfterEnv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Default timeout per test
// some tests may take longer in which case you should specify the timeout
// explicitly for each test by using the third parameter of test function
jest.setTimeout(globalThis.defaultTimeout);

0 comments on commit 80947ab

Please sign in to comment.