зеркало из https://github.com/nextcloud/spreed.git
Execute unit tests on github
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
e1ca035086
Коммит
1fcfd99dc9
|
@ -0,0 +1,19 @@
|
|||
name: Test
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
jest:
|
||||
runs-on: ubuntu-latest
|
||||
name: ESLint
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: NPM install
|
||||
run: npm i
|
||||
- name: jest
|
||||
run: npm run test:unit
|
|
@ -23,6 +23,6 @@
|
|||
module.exports = {
|
||||
preset: '@vue/cli-plugin-unit-jest/presets/no-babel',
|
||||
// Allow tests in the src and in tests/unit folders
|
||||
testMatch: ['<rootDir>/src/**/*.(spec|test).(ts|js)', '<rootDir>/tests/unit/**/*.(spec|test).(ts|js)'],
|
||||
setupFilesAfterEnv: ['<rootDir>/tests/unit/setup.js'],
|
||||
testMatch: ['<rootDir>/src/**/*.(spec|test).(ts|js)'],
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.js'],
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
"author": "Joas Schilling <coding@schilljs.com>",
|
||||
"scripts": {
|
||||
"build": "NODE_ENV=production webpack --progress --hide-modules --config webpack.prod.js",
|
||||
"test:unit": "vue-cli-service test:unit --watchAll",
|
||||
"test:unit": "vue-cli-service test:unit",
|
||||
"test:watch": "vue-cli-service test:unit --watchAll",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"dev": "NODE_ENV=development webpack --config webpack.dev.js",
|
||||
"lint:fix": "eslint --ext .js,.vue src --fix",
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
*
|
||||
*/
|
||||
global.OC = {
|
||||
requestToken: '123'
|
||||
requestToken: '123',
|
||||
}
|
||||
global.t = (app, text) => text
|
||||
global.t = (app, text) => text
|
Загрузка…
Ссылка в новой задаче