mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-21 23:53:52 +00:00
Fix unittesting after cypress addition
This commit is contained in:
parent
7c68d56df8
commit
4c666c1666
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -31,8 +31,8 @@ jobs:
|
|||
- name: Run type check
|
||||
run: yarn check-types
|
||||
|
||||
# - name: Run Tests
|
||||
# run: yarn test:unit
|
||||
- name: Run Tests
|
||||
run: yarn test:unit
|
||||
|
||||
# - name: Cypress run
|
||||
# uses: cypress-io/github-action@v2
|
||||
|
@ -40,7 +40,7 @@ jobs:
|
|||
# build: yarn build
|
||||
# start: yarn start
|
||||
|
||||
- name: Run Component tests 🧪
|
||||
- name: Run Component tests
|
||||
uses: cypress-io/github-action@v2
|
||||
with:
|
||||
# we have already installed everything
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
module.exports = {
|
||||
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
|
||||
// testMatch: ['**/tests/unit/**/*.test.[jt]s?(x)'],
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsConfig: 'tests/tsconfig.json',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
"lint": "vue-cli-service lint",
|
||||
"check-types": "tsc --noemit",
|
||||
"lint-ci": "vue-cli-service lint --no-fix",
|
||||
"cypress:open": "cypress open",
|
||||
"cypress:run-ct": "cypress run-ct"
|
||||
"cy:open": "cypress open",
|
||||
"cy:open-ct": "cypress open-ct",
|
||||
"cy:run-ct": "cypress run-ct"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cypress/vue": "^2.2.3",
|
||||
|
|
12
tests/tsconfig.json
Normal file
12
tests/tsconfig.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"types": [
|
||||
"jest",
|
||||
],
|
||||
},
|
||||
"include": [
|
||||
"unit/*.ts",
|
||||
"unit/*.tsx"
|
||||
],
|
||||
}
|
7
tests/unit/formatters.spec.ts
Normal file
7
tests/unit/formatters.spec.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { formatPercent } from '@/shared/formatters';
|
||||
|
||||
describe('formatters.ts', () => {
|
||||
it('Format percent correctly', () => {
|
||||
expect(formatPercent(0.5)).toEqual('50.000%');
|
||||
});
|
||||
});
|
|
@ -15,7 +15,7 @@
|
|||
"baseUrl": "src",
|
||||
"types": [
|
||||
"webpack-env",
|
||||
"jest",
|
||||
// "jest",
|
||||
"cypress"
|
||||
],
|
||||
"paths": {
|
||||
|
@ -28,10 +28,9 @@
|
|||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"tests/**/*.ts",
|
||||
"tests/**/*.tsx"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
// "tests"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user