-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Jest for testing /libs and /xplat (#185)
- Loading branch information
1 parent
a1d07cc
commit aaaae83
Showing
30 changed files
with
2,145 additions
and
2,092 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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ubuntu:18.04 | ||
|
||
WORKDIR '/xplat' | ||
|
||
COPY . . | ||
|
||
RUN chmod +x ./scripts/*.sh | ||
RUN ./scripts/docker-npm-setup.sh | ||
|
||
# keep container opened during development | ||
CMD tail -f /dev/null |
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
11 changes: 11 additions & 0 deletions
11
packages/angular/src/schematics/xplat/_testing_files/jest.libs.config.js
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 @@ | ||
module.exports = { | ||
name: 'libs', | ||
preset: '../jest.config.js', | ||
rootDir: '../libs', | ||
coverageDirectory: '../coverage/libs', | ||
snapshotSerializers: [ | ||
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js', | ||
'jest-preset-angular/build/AngularSnapshotSerializer.js', | ||
'jest-preset-angular/build/HTMLCommentSerializer.js' | ||
] | ||
}; |
11 changes: 11 additions & 0 deletions
11
packages/angular/src/schematics/xplat/_testing_files/jest.xplat.config.js
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 @@ | ||
module.exports = { | ||
name: 'xplat', | ||
preset: '../jest.config.js', | ||
rootDir: '../xplat', | ||
coverageDirectory: '../coverage/xplat', | ||
snapshotSerializers: [ | ||
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js', | ||
'jest-preset-angular/build/AngularSnapshotSerializer.js', | ||
'jest-preset-angular/build/HTMLCommentSerializer.js' | ||
] | ||
}; |
31 changes: 0 additions & 31 deletions
31
packages/angular/src/schematics/xplat/_testing_files/karma.conf.js
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
packages/angular/src/schematics/xplat/_testing_files/test-setup.ts__tmpl__
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 @@ | ||
import 'jest-preset-angular'; |
20 changes: 0 additions & 20 deletions
20
packages/angular/src/schematics/xplat/_testing_files/test.libs.ts__tmpl__
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
packages/angular/src/schematics/xplat/_testing_files/test.xplat.ts__tmpl__
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
packages/angular/src/schematics/xplat/_testing_files/tsconfig.json
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,7 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"types": ["node", "jest"] | ||
}, | ||
"include": ["**/*.ts"] | ||
} |
27 changes: 0 additions & 27 deletions
27
packages/angular/src/schematics/xplat/_testing_files/tsconfig.libs.json
This file was deleted.
Oops, something went wrong.
7 changes: 4 additions & 3 deletions
7
packages/angular/src/schematics/xplat/_testing_files/tsconfig.libs.spec.json
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../dist/out-tsc/libs", | ||
"types": ["jasmine", "node"] | ||
"module": "commonjs", | ||
"types": ["jest", "node"] | ||
}, | ||
"files": ["test.libs.ts"], | ||
"files": ["test-setup.ts"], | ||
"include": ["../libs/**/*.spec.ts", "../libs/**/*.d.ts"] | ||
} |
7 changes: 0 additions & 7 deletions
7
packages/angular/src/schematics/xplat/_testing_files/tsconfig.xplat.json
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.