Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ coverage:
status:
project:
default:
target: 95%
target: 85%
patch:
default:
target: 95%
target: 90%
4 changes: 4 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ To run specific tests, you can use the `-t` flag to match the name mentioned in
# Run all tests in the 'Transaction Builder' describe block (test/e2e/transaction-builder/TransactionBuilder.test.ts)
yarn test -t 'Transaction Builder'
```

## Code Coverage

New contributions have a code coverage target of 90%+. You can run `yarn test --coverage` to see the coverage report before submitting a PR.
10 changes: 5 additions & 5 deletions packages/cashc/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
root: './test',
test: {
environment: 'node',
include: ['test/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
exclude: ['**/types/**'],
globals: true,
silent: 'passed-only',
include: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
setupFiles: ['./vitest.setup.ts'],
exclude: ['**/types/**'],
coverage: {
provider: 'v8',
reporter: ['json-summary'],
include: ['src/**/*.ts'],
exclude: ['src/grammar/**/*.ts'],
},
setupFiles: ['./vitest.setup.ts'],
},
});
8 changes: 4 additions & 4 deletions packages/cashscript/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
root: './test',
test: {
environment: 'node',
include: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
setupFiles: ['./vitest.setup.ts'],
include: ['test/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
exclude: ['**/types/**'],
testTimeout: 50000,
globals: true,
silent: 'passed-only',
coverage: {
provider: 'v8',
include: ['src/**/*.ts'],
},
setupFiles: ['./vitest.setup.ts'],
testTimeout: 50000,
},
});
2 changes: 1 addition & 1 deletion packages/cashscript/vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inspect } from 'util';
import '../src/test/TestExtensions.js';
import './src/test/TestExtensions.js';

inspect.defaultOptions.depth = 10;
7 changes: 4 additions & 3 deletions packages/utils/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
root: './test',
test: {
environment: 'node',
silent: 'passed-only',
include: ['test/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
exclude: ['**/types/**'],
globals: true,
silent: 'passed-only',
coverage: {
provider: 'v8',
reporter: ['json-summary'],
include: ['src/**/*.ts'],
},
},
});