forked from epicmaxco/vuestic-admin
-
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.
close epicmaxco#456
- Loading branch information
Showing
6 changed files
with
1,603 additions
and
39 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
moduleFileExtensions: [ | ||
'js', | ||
'jsx', | ||
'json', | ||
'vue' | ||
], | ||
transform: { | ||
'^.+\\.vue$': 'vue-jest', | ||
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub', | ||
'^.+\\.jsx?$': 'babel-jest' | ||
}, | ||
moduleNameMapper: { | ||
'^@/(.*)$': '<rootDir>/src/$1' | ||
}, | ||
snapshotSerializers: [ | ||
'jest-serializer-vue' | ||
], | ||
testMatch: [ | ||
'**/src/**/*.spec.(js|jsx|ts|tsx)' | ||
], | ||
testURL: 'http://localhost/' | ||
} |
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,20 +1,16 @@ | ||
{ | ||
"name": "vuestic-admin", | ||
"version": "1.9.0", | ||
"private": false, | ||
"description": "Vue.js admin template", | ||
"author": "smartapant <[email protected]>", | ||
"private": false, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"lint": "vue-cli-service lint", | ||
"inspect": "vue-cli-service inspect > inspect.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/epicmaxco/vuestic-admin.git" | ||
"inspect": "vue-cli-service inspect > inspect.js", | ||
"test:unit": "vue-cli-service test:unit" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"amcharts3": "^3.21.13", | ||
"ammap3": "^3.21.13", | ||
|
@@ -56,9 +52,13 @@ | |
"devDependencies": { | ||
"@vue/cli-plugin-babel": "^3.0.5", | ||
"@vue/cli-plugin-eslint": "^3.0.5", | ||
"@vue/cli-plugin-unit-jest": "^3.3.0", | ||
"@vue/cli-service": "^3.0.5", | ||
"@vue/eslint-config-standard": "^3.0.5", | ||
"@vue/test-utils": "^1.0.0-beta.20", | ||
"autoprefixer": "9.1.5", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-jest": "^23.6.0", | ||
"chalk": "2.4.1", | ||
"connect-history-api-fallback": "1.5.0", | ||
"copy-webpack-plugin": "4.5.3", | ||
|
@@ -88,6 +88,7 @@ | |
"gitHooks": { | ||
"pre-commit": "lint-staged" | ||
}, | ||
"license": "MIT", | ||
"lint-staged": { | ||
"*.js": [ | ||
"vue-cli-service lint", | ||
|
@@ -97,5 +98,9 @@ | |
"vue-cli-service lint", | ||
"git add" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/epicmaxco/vuestic-admin.git" | ||
} | ||
} |
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,5 @@ | ||
module.exports = { | ||
env: { | ||
jest: true | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/vuestic-theme/vuestic-components/vuestic-checkbox/VaCheckbox.spec.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,17 @@ | ||
import { shallowMount } from '@vue/test-utils' | ||
import VaCheckbox from './VuesticCheckbox' | ||
|
||
describe('VaCheckbox', () => { | ||
it('default', () => { | ||
const wrapper = shallowMount(VaCheckbox, { | ||
propsData: { value: false } | ||
}) | ||
expect(wrapper.html()).toMatchSnapshot() | ||
}) | ||
it('true value', () => { | ||
const wrapper = shallowMount(VaCheckbox, { | ||
propsData: { value: true } | ||
}) | ||
expect(wrapper.html()).toMatchSnapshot() | ||
}) | ||
}) |
21 changes: 21 additions & 0 deletions
21
src/vuestic-theme/vuestic-components/vuestic-checkbox/__snapshots__/VaCheckbox.spec.js.snap
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,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`VaCheckbox default 1`] = ` | ||
<div class="vuestic-checkbox"> | ||
<div class="vuestic-checkbox__square"><input readonly="readonly" class="vuestic-checkbox__input"> <i aria-hidden="true" class="ion ion-md-checkmark vuestic-checkbox__icon-selected"></i></div> | ||
<div class="vuestic-checkbox__label-text"> | ||
</div> | ||
<!----> | ||
</div> | ||
`; | ||
exports[`VaCheckbox true value 1`] = ` | ||
<div class="vuestic-checkbox vuestic-checkbox--selected"> | ||
<div class="vuestic-checkbox__square active"><input readonly="readonly" class="vuestic-checkbox__input"> <i aria-hidden="true" class="ion ion-md-checkmark vuestic-checkbox__icon-selected"></i></div> | ||
<div class="vuestic-checkbox__label-text"> | ||
</div> | ||
<!----> | ||
</div> | ||
`; |
Oops, something went wrong.