Skip to content

Commit 7902d06

Browse files
authored
Merge pull request #2 from socotecio/core/tests
Core/tests
2 parents 4a40cef + 4ea51e7 commit 7902d06

File tree

9 files changed

+3300
-77
lines changed

9 files changed

+3300
-77
lines changed

.circleci/config.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ jobs:
55
- image: circleci/node:latest
66
steps:
77
- checkout
8-
# TODO
8+
- run: npm install
9+
- run: npm run test:unit
910

1011
release:
1112
docker:
@@ -24,4 +25,7 @@ workflows:
2425
- test
2526
- release:
2627
requires:
27-
- test
28+
- test
29+
filters:
30+
branches:
31+
only: main

.eslintrc.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
11
module.exports = {
22
root: true,
3+
34
env: {
45
node: true
56
},
7+
68
extends: [
79
//"plugin:vue/vue3-essential",
810
"plugin:vue/vue3-recommended",
911
"eslint:recommended",
1012
"@vue/typescript"
1113
],
14+
1215
parserOptions: {
1316
parser: "@typescript-eslint/parser"
1417
},
18+
1519
plugins: [
1620
"typescript"
1721
],
22+
1823
rules: {
1924
'vue/no-unused-vars': 'off',
2025
"@typescript-eslint/no-unused-vars": [
2126
"error"
2227
]
23-
}
28+
},
29+
30+
overrides: [
31+
{
32+
files: [
33+
'**/__tests__/*.{j,t}s?(x)',
34+
'**/tests/unit/**/*.spec.{j,t}s?(x)'
35+
],
36+
env: {
37+
jest: true
38+
}
39+
}
40+
]
2441
};
25-
42+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If yes was it frustrating ?
88
If yes then this lib is here to help your user never feel that again. Even if you reload the page or share the link with others user.
99

1010

11-
Now there is already some other lib even in pure Vanilla to sync the query parameters with a javascript object. But you have to rewrite all the logic avec the datatble options (page, pageSize, ordering) and even compare the difference between two state.
11+
Now there is already some other lib even in pure Vanilla to sync the query parameters with a javascript object. But you have to rewrite all the logic with the datatable options (page, pageSize, ordering) and even compare the difference between two state.
1212

1313
By separating the filters and the datable options vue-datatable-url-sync automatise all the desired behavior for working with datatable.
1414

jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
3+
transform: {
4+
'^.+\\.vue$': 'vue-jest',
5+
}
6+
}

0 commit comments

Comments
 (0)