Skip to content

Commit

Permalink
Merge pull request #1 from 14nrv/dev
Browse files Browse the repository at this point in the history
feat: add jest matchers for vue
  • Loading branch information
14nrv authored Oct 19, 2018
2 parents 332a2cd + 2ae26b3 commit 7fa0199
Show file tree
Hide file tree
Showing 20 changed files with 3,339 additions and 215 deletions.
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ module.exports = {
env: {
node: true
},
'extends': [
extends: [
'plugin:vue/essential',
'plugin:jest/recommended',
'@vue/standard'
],
plugins: [
'vue',
'jest'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DS_Store
node_modules
/dist
dist

# local env files
.env.local
Expand All @@ -19,3 +19,8 @@ yarn-error.log*
*.njsproj
*.sln
*.sw*

coverage

.history
*.zip
28 changes: 28 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
verifyConditions:
- "@semantic-release/changelog"
- "@semantic-release/npm"
- "@semantic-release/github"
- "@semantic-release/git"

prepare:
- "@semantic-release/changelog"
- "@semantic-release/npm"
-
path: "@semantic-release/git"
assets":
- "package.json"
- "dist"
message: "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"

publish:
- "@semantic-release/npm"
-
path: "@semantic-release/github"
assets:
- path: "dist"

success:
- "@semantic-release/github"

fail:
- "@semantic-release/github"
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
language: node_js
cache: yarn
notifications:
email: false
node_js:
- '8'

stages:
- test
- name: deploy
if: branch = master

jobs:
include:
- stage: test
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- yarn lint -f ./node_modules/eslint-junit/index.js
- yarn test
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

- stage: deploy
script:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then yarn semantic-release; fi
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# vtu-matcher
# jest-vue-matcher

## Project setup
```
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
'jest-serializer-vue'
],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
'**/*.spec.(js|jsx|ts|tsx)'
],
testURL: 'http://localhost/'
}
83 changes: 75 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,92 @@
{
"name": "vtu-matcher",
"version": "0.1.0",
"private": true,
"name": "jest-vue-matcher",
"version": "0.0.0-development",
"description": "Additional jest matchers for vue",
"author": "14nrv",
"license": "MIT",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build": "vue-cli-service build --target lib --name jest-vue-matcher ./src/matchers.js",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
"test": "vue-cli-service test:unit --coverage",
"test:tdd": "vue-cli-service test:unit --coverage --watchAll",
"semantic-release": "semantic-release"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && yarn test",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": {
"linters": {
"*.{js,vue}": "vue-cli-service lint"
},
"ignore": [
"dist/*.js"
]
},
"main": "./dist/jest-vue-matcher.common.js",
"files": [
"src/*",
"dist/*"
],
"repository": {
"type": "git",
"url": "https://github.com/14nrv/jest-vue-matcher.git"
},
"bugs": {
"url": "https://github.com/14nrv/jest-vue-matcher/issues"
},
"homepage": "https://github.com/14nrv/jest-vue-matcher#readme",
"keywords": [
"jest",
"jest-matchers",
"vue",
"vuejs",
"vue-test-utils",
"vue-test",
"vue-testing-tools"
],
"dependencies": {
"vue": "^2.5.17"
},
"devDependencies": {
"@commitlint/cli": "^7.2.1",
"@commitlint/config-conventional": "^7.1.2",
"@semantic-release/changelog": "^3.0.1",
"@semantic-release/git": "^7.0.5",
"@semantic-release/github": "^5.2.0",
"@semantic-release/npm": "^5.0.5",
"@vue/cli-plugin-babel": "^3.0.5",
"@vue/cli-plugin-eslint": "^3.0.5",
"@vue/cli-plugin-unit-jest": "^3.0.5",
"@vue/cli-service": "^3.0.5",
"@vue/eslint-config-standard": "^3.0.5",
"@vue/test-utils": "^1.0.0-beta.20",
"@vue/test-utils": "^1.0.0-beta.25",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.0.1",
"vue-template-compiler": "^2.5.17"
"eslint-junit": "^1.0.1",
"eslint-plugin-jest": "^21.25.1",
"husky": "^1.1.2",
"jest-junit": "^5.2.0",
"jest-matcher-utils": "^23.6.0",
"lint-staged": "^7.3.0",
"semantic-release": "^15.10.3",
"vue-template-compiler": "^2.5.17",
"wallaby-vue-compiler": "^1.0.3"
},
"jest-junit": {
"output": "coverage/junit/js-test-results.xml"
},
"eslint-junit": {
"output": "coverage/junit/js-eslint-results.xml"
},
"engines": {
"node": ">=8.3.0"
}
}
Binary file removed public/favicon.ico
Binary file not shown.
17 changes: 0 additions & 17 deletions public/index.html

This file was deleted.

28 changes: 0 additions & 28 deletions src/App.vue

This file was deleted.

Binary file removed src/assets/logo.png
Binary file not shown.
59 changes: 0 additions & 59 deletions src/components/HelloWorld.vue

This file was deleted.

Loading

0 comments on commit 7fa0199

Please sign in to comment.