-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from snohio/lastlink/jest
init jest tests
- Loading branch information
Showing
6 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ _site/ | |
|
||
# Local Netlify folder | ||
.netlify | ||
junit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module.exports = { | ||
globals: { | ||
"ts-jest": { | ||
tsConfig: "tsconfig.json" | ||
} | ||
}, | ||
moduleFileExtensions: [ | ||
"ts", | ||
"js" | ||
], | ||
transform: { | ||
"^.+\\.(ts|tsx)$": "ts-jest" | ||
}, | ||
testMatch: [ | ||
"**/tests/**/*.spec.(ts|js)" | ||
], | ||
runner: "jest-serial-runner", | ||
testEnvironment: "node", | ||
reporters: ["default", "jest-junit"], | ||
// collectCoverage: true, | ||
collectCoverageFrom: ["src/**/*.{ts,js}", "!**/node_modules/**"] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
const events = require('../../src/_data/flat_events') as any[]; | ||
|
||
describe('flat_events', () => { | ||
it('should return an array of events', () => { | ||
expect(events).toBeInstanceOf(Array) | ||
}); | ||
|
||
|
||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
const filters = require('../../src/js/filters'); | ||
|
||
|
||
describe('filters', function() { | ||
it('no address return default', async () => { | ||
const r = await filters.geoApify(''); | ||
expect(r).toEqual("[0,0]") | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "CommonJS", | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"importHelpers": true, | ||
"allowJs": true, | ||
"declaration": true, | ||
"outDir": "./lib", | ||
"lib": [ | ||
"es2018", | ||
"dom" | ||
], | ||
"strict": true, | ||
"types": [ | ||
"jest", | ||
"node" | ||
] | ||
}, | ||
"include": [ | ||
"src" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"**/tests/*" | ||
] | ||
} |