sanke1
6 years ago
committed by
Alexey Velikiy
6 changed files with 47 additions and 1 deletions
@ -0,0 +1,21 @@
|
||||
module.exports = { |
||||
"verbose": true, |
||||
"globals": { |
||||
"ts-jest": { |
||||
"useBabelrc": true, |
||||
"tsConfigFile": "tsconfig.jest.json" |
||||
} |
||||
}, |
||||
"transform": { |
||||
"\\.ts": "ts-jest" |
||||
}, |
||||
"testRegex": "(\\.|/)([jt]est)\\.[jt]s$", |
||||
"moduleFileExtensions": [ |
||||
"ts", |
||||
"js", |
||||
"json" |
||||
], |
||||
"setupFiles": [ |
||||
"<rootDir>/spec/setup_tests.ts" |
||||
] |
||||
}; |
@ -0,0 +1,7 @@
|
||||
describe("Basic test", function() { |
||||
let text = "I am a basic test"; |
||||
|
||||
it("should work", function() { |
||||
expect(text).toBe("I am a basic test"); |
||||
}) |
||||
}) |
@ -0,0 +1,8 @@
|
||||
import { HASTIC_PORT } from '../src/config'; |
||||
|
||||
describe("When importing from .ts files", function() { |
||||
|
||||
it("should work", function() { |
||||
expect(HASTIC_PORT).toBe(8000) |
||||
}) |
||||
}) |
@ -0,0 +1,2 @@
|
||||
console.log = jest.fn(); |
||||
console.error = jest.fn(); |
Loading…
Reference in new issue