Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adding Tests#355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
liron-navon wants to merge11 commits intovuejs:master
base:master
Choose a base branch
Loading
fromliron-navon:tests
Open
Show file tree
Hide file tree
Changes fromall 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
9 changes: 8 additions & 1 deletion.babelrc
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,5 +4,12 @@
],
"plugins": [
"syntax-dynamic-import"
]
],
"env": {
"test": {
"presets": [
["env", { "targets": { "node": "current" }}]
]
}
}
}
32 changes: 32 additions & 0 deletions.circleci/config.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:11.8-browsers
steps:
- checkout # special step to check out source code to working directory
- restore_cache: # special step to restore the dependency cache
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: install npm dependencies
command: npm install
- save_cache: # special step to save the dependency cache
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run:
name: starting a development server
command: npm run dev
background: true
- run:
name: waiting for server to be responsive (for e2e)
command: |
while ! nc -z localhost 8080; do
sleep 0.1 # wait for 1/10 of the second before check again
done
- run:
name: running unit tests
command: npm run test:unit
- run:
name: running end to end tests
command: npm run test:e2e
36 changes: 36 additions & 0 deletionsjest.config.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
module.exports = {
// we can actually use "@/components/item.vue" to access components in a simple way
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
// the 'create-api' is defined in webpack
"^create-api$": '<rootDir>/src/api/create-api-client.js',
},
// the file types we want jest to accept
moduleFileExtensions: [
"js",
"json",
// tell Jest to handle `*.vue` files
"vue"
],
// transformations we want jest to apply
transform: {
// process `*.vue` files with `vue-jest`
".*\\.(vue)$": "vue-jest",
// process js files with jest
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
// process assets with transform stub
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
},
// we will use this to create snapshot tests
snapshotSerializers: [
'jest-serializer-vue',
],
// used for jsdom to mimic a real browser with a real url
testURL: 'http://localhost/',
// we should collect coverage
collectCoverage: true,
// set a directory for coverage cache
coverageDirectory: '<rootDir>/__coverage__',
// set patterns to ignore for coverate (["/node_modules/"]) is the default value
coveragePathIgnorePatterns: ["/node_modules/"]
};
Loading

[8]ページ先頭

©2009-2025 Movatter.jp