Skip to content

Commit 6d171ad

Browse files
authoredMar 15, 2022
Merge pull request #2632 from nextcloud/fix/type-quting
2 parents 67a9da3 + b34df2d commit 6d171ad

File tree

12 files changed

+21216
-13300
lines changed

12 files changed

+21216
-13300
lines changed
 

‎.github/workflows/node-test.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
6+
name: Node
7+
8+
on:
9+
pull_request:
10+
push:
11+
branches:
12+
- main
13+
- master
14+
- stable*
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
20+
name: test
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Read package.json node and npm engines version
26+
uses: skjnldsv/read-package-engines-version-actions@v1.2
27+
id: versions
28+
with:
29+
fallbackNode: '^12'
30+
fallbackNpm: '^6'
31+
32+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: ${{ steps.versions.outputs.nodeVersion }}
36+
37+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
38+
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Testing
44+
run: npm run test:coverage --if-present
45+
46+
- name: Upload coverage
47+
uses: codecov/codecov-action@v2

‎jest.config.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const esModules = ['p-limit', 'yocto-queue'].join('|')
2+
3+
module.exports = {
4+
preset: 'ts-jest',
5+
moduleFileExtensions: ['js', 'vue', 'ts'],
6+
collectCoverageFrom: [
7+
'src/**/*.{js,vue}',
8+
'!**/node_modules/**',
9+
],
10+
setupFilesAfterEnv: [
11+
'<rootDir>/tests/setup.js',
12+
],
13+
testEnvironment: 'jsdom',
14+
transform: {
15+
'^.+\\.ts$': 'ts-jest',
16+
'^.+\\.js$': 'babel-jest',
17+
'^.+\\.vue$': '@vue/vue2-jest',
18+
},
19+
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
20+
}

0 commit comments

Comments
 (0)