-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
80 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
clearMocks: true, | ||
coverageDirectory: "coverage", | ||
coverageProvider: "v8", | ||
testMatch: [ | ||
"**/test/**/*.[t]s?(x)", | ||
"**/__tests__/**/*.[t]s?(x)", | ||
"**/?(*.)+(spec|test).[t]s?(x)" | ||
], | ||
testTimeout: 2000, | ||
}; |
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 @@ | ||
import "./Map.mod"; | ||
|
||
describe('map mod', () => | ||
{ | ||
it('should return an array', () => | ||
{ | ||
const map = new Map<string, string>(); | ||
map.set("a", "b"); | ||
expect(map.array()).toEqual(["b"]); | ||
}) | ||
}) |
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 @@ | ||
import "./String.mod"; | ||
|
||
describe('string mod', () => | ||
{ | ||
it("first letter should be uppercase", () => | ||
{ | ||
const s = "abc"; | ||
expect(s).toEqual("abc"); | ||
expect(s.firstLetterUpperCase()).toEqual("Abc"); | ||
}); | ||
}); |
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
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 |
---|---|---|
|
@@ -13,15 +13,15 @@ | |
"cpg-api:build": "tsc --project ./apps/api/tsconfig.json --watch", | ||
"cpg-api:dev": "turbo run dev --scope=cpg-api", | ||
"cpg-customer:dev": "turbo run dev --scope=cpg-customer", | ||
"format": "npx eslint \"**/*.{ts,tsx}\" --fix" | ||
"format": "npx eslint \"**/*.{ts,tsx}\" --fix", | ||
"test": "turbo run test" | ||
}, | ||
"devDependencies": { | ||
"turbo": "latest" | ||
"turbo": "^1.4.3" | ||
}, | ||
"engines": { | ||
"npm": ">=7.0.0", | ||
"node": ">=14.0.0" | ||
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": {} | ||
"packageManager": "[email protected]" | ||
} |
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,13 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
clearMocks: true, | ||
coverageDirectory: "coverage", | ||
coverageProvider: "v8", | ||
testMatch: [ | ||
"**/test/**/*.[t]s?(x)", | ||
"**/__tests__/**/*.[t]s?(x)", | ||
"**/?(*.)+(spec|test).[t]s?(x)" | ||
], | ||
testTimeout: 2000, | ||
}; |
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,9 @@ | ||
import AW from "./AW"; | ||
|
||
describe("AW", () => | ||
{ | ||
it("should return a promise", async () => | ||
{ | ||
expect(AW(await Promise.resolve())).toBeInstanceOf(Promise); | ||
}); | ||
}); |
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