Skip to content

Commit eca8a61

Browse files
committed
test: init @vuepress/test-utils and migrate all tests
1 parent d708d33 commit eca8a61

File tree

37 files changed

+227
-224
lines changed

37 files changed

+227
-224
lines changed

package.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,13 @@
4040
]
4141
},
4242
"devDependencies": {
43-
"@vue/test-utils": "^1.0.0-beta.16",
44-
"@babel/core": "^7.0.0-beta.47",
45-
"@babel/preset-env": "^7.0.0-beta.47",
46-
"babel-core": "^7.0.0-0",
47-
"babel-jest": "^23.0.0",
4843
"conventional-changelog-cli": "^1.3.22",
4944
"eslint": "^4.19.1",
5045
"eslint-plugin-jest": "^21.15.1",
5146
"eslint-plugin-vue-libs": "^3.0.0",
52-
"execa": "^0.10.0",
53-
"jest": "^23.0.0",
54-
"jest-serializer-vue": "^1.0.0",
5547
"lerna": "^2.11.0",
5648
"lint-staged": "^7.0.4",
5749
"minimist": "^1.2.0",
58-
"vue-jest": "^2.6.0",
5950
"yorkie": "^1.0.3"
6051
},
6152
"engines": {

test/app/Content.spec.js renamed to packages/@vuepress/core/__test__/app/Content.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import Content from '@/app/components/Content'
1+
import Content from '../../lib/app/components/Content'
22
import { mount } from '@vue/test-utils'
3-
import { getRouter, modeTestRunner } from '../util'
3+
import modeTestRunner from '@vuepress/test-utils/modeTestRunner'
4+
import getRouter from '@vuepress/test-utils/getRouter'
45

56
function test (mode, localVue) {
67
it(`${mode} - add custom class by default.`, () => {

test/prepare/fixtures/docs-custom-theme/.vuepress/config.js renamed to packages/@vuepress/core/__test__/prepare/fixtures/docs-custom-theme/.vuepress/config.js

File renamed without changes.

test/prepare/fixtures/docs-custom-theme/.vuepress/theme/Layout.vue renamed to packages/@vuepress/core/__test__/prepare/fixtures/docs-custom-theme/.vuepress/theme/Layout.vue

File renamed without changes.

test/prepare/fixtures/docs-custom-theme/README.md renamed to packages/@vuepress/core/__test__/prepare/fixtures/docs-custom-theme/README.md

File renamed without changes.

test/prepare/fixtures/docs-simple-config/.vuepress/config.js renamed to packages/@vuepress/core/__test__/prepare/fixtures/docs-simple-config/.vuepress/config.js

File renamed without changes.

test/prepare/fixtures/docs-simple-config/README.md renamed to packages/@vuepress/core/__test__/prepare/fixtures/docs-simple-config/README.md

File renamed without changes.

test/prepare/fixtures/docs-simple/README.md renamed to packages/@vuepress/core/__test__/prepare/fixtures/docs-simple/README.md

File renamed without changes.

test/prepare/util.spec.js renamed to packages/@vuepress/core/__test__/prepare/util.spec.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
isIndexFile,
3-
fileToPath
4-
} from '@/prepare/util.js'
1+
import { isIndexFile, fileToPath } from '../../lib/prepare/util.js'
52

63
describe('prepare - util', () => {
74
test('isIndexFile', () => {

test/util/parseHeaders.spec.js renamed to packages/@vuepress/core/__test__/util/parseHeaders.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
parseHeaders,
33
removeNonCodeWrappedHTML,
44
deeplyParseHeaders
5-
} from '@/util/parseHeaders'
5+
} from '../../lib/util/parseHeaders'
66

77
describe('parseHeaders', () => {
88
test('should unescape html', () => {

0 commit comments

Comments
 (0)