-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
97f9ab2
commit 518917c
Showing
5 changed files
with
62 additions
and
3 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 |
---|---|---|
|
@@ -7,4 +7,5 @@ npm-debug.log | |
/.idea/ | ||
|
||
# misc | ||
package-lock.json | ||
package-lock.json | ||
/coverage/ |
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,4 @@ | ||
module.exports = { | ||
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel', | ||
collectCoverage: true | ||
} |
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,38 @@ | ||
import initialState from '@/store/state' | ||
import mutations from '@/store/mutations' | ||
import {State} from "@/types/State"; | ||
|
||
test('set metadata', () => { | ||
const testState: State = { ...initialState } | ||
const metadata = {} | ||
mutations.setMetadata(testState, metadata) | ||
expect(testState.metadata).toBe(metadata) | ||
}) | ||
|
||
test('set samples', () => { | ||
const testState: State = { ...initialState } | ||
const samples = {} | ||
mutations.setSamples(testState, samples) | ||
expect(testState.samples).toBe(samples) | ||
}) | ||
|
||
test('set selected sample', () => { | ||
const testState: State = { ...initialState } | ||
const sample = {} | ||
mutations.setSelectedSample(testState, sample) | ||
expect(testState.selectedSample).toBe(sample) | ||
}) | ||
|
||
test('set selected sample phenotypes', () => { | ||
const testState: State = { ...initialState } | ||
const phenotypes = {} | ||
mutations.setSelectedSamplePhenotypes(testState, phenotypes) | ||
expect(testState.selectedSamplePhenotypes).toBe(phenotypes) | ||
}) | ||
|
||
test('set records', () => { | ||
const testState: State = { ...initialState } | ||
const records = {} | ||
mutations.setRecords(testState, records) | ||
expect(testState.records).toBe(records) | ||
}) |
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 |
---|---|---|
|
@@ -14,7 +14,8 @@ | |
"types": [ | ||
"webpack-env", | ||
"webpack", | ||
"webpack-env" | ||
"webpack-env", | ||
"jest" | ||
], | ||
"paths": { | ||
"@/*": [ | ||
|