mirror of
https://github.com/bitwarden/cli
synced 2025-12-06 04:23:19 +00:00
Create testing framework for CLI (#453)
* Create testing framework for CLI - Need to add tsconfig for specs to convert module format and add spec dir to output - Use jasmine-ts to test expected dev cycle would be to have two watchers, one for jslib and one for CLI tests. We could add jslib tests to this jasmine config, but it feels wrong to test a submodule * Run prettier * Add tests to build pipeline * Include required package * Add placeholder test * Run prettier * Add nodemon and fix watch
This commit is contained in:
3
spec/bw.spec.ts
Normal file
3
spec/bw.spec.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
describe("bw", () => {
|
||||
it("is a placeholder test");
|
||||
});
|
||||
4
spec/helpers.ts
Normal file
4
spec/helpers.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// tslint:disable-next-line
|
||||
const TSConsoleReporter = require("jasmine-ts-console-reporter");
|
||||
jasmine.getEnv().clearReporters(); // Clear default console reporter
|
||||
jasmine.getEnv().addReporter(new TSConsoleReporter());
|
||||
7
spec/support/jasmine.json
Normal file
7
spec/support/jasmine.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"spec_dir": "spec",
|
||||
"spec_files": ["**/*[sS]pec.ts"],
|
||||
"helpers": ["helpers.ts"],
|
||||
"stopSpecOnExpectationFailure": false,
|
||||
"random": true
|
||||
}
|
||||
7
spec/tsconfig.json
Normal file
7
spec/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "../tsconfig",
|
||||
"include": ["src", "spec"],
|
||||
"compilerOptions": {
|
||||
"module": "commonjs"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user