Skip to content

Commit

Permalink
Jest integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Przemysław Rząsa authored and Przemysław Rząsa committed Dec 15, 2021
1 parent ffab86a commit 1d6bb64
Show file tree
Hide file tree
Showing 28 changed files with 3,014 additions and 252 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ yarn.lock
# Mac OSX Finder files.
**/.DS_Store
.DS_Store

# Configs
!jest.config.js
13 changes: 8 additions & 5 deletions cli/cli.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cli/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "path";
import * as arg from "arg";
import path from "path";
import arg from "arg";
import { spawn } from "child_process";

const PATH_ARGUMENT = 1;
Expand Down
17 changes: 17 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
testMatch: ["**/*_spec.ts"],
testRunner: "jest-jasmine2",
moduleNameMapper: {
"@consts(.*)": "<rootDir>/consts/$1",
"@enums(.*)": "<rootDir>/types/enums/$1",
"@mocks(.*)": "<rootDir>/mocks/$1",
"@interfaces(.*)": "<rootDir>/types/interfaces/$1",
"@janush-schematics(.*)": "<rootDir>/schematics/$1",
"@utility(.*)": "<rootDir>/schematics/utility/$1",
"@utils(.*)": "<rootDir>/utils/$1",
},
setupFilesAfterEnv: ["./test/setupJestAfterEnv.ts"],
};
Loading

0 comments on commit 1d6bb64

Please # to comment.