Skip to content

Commit 3f1937f

Browse files
authored
Add tests for autocomplete before refactor (#10)
* setup prettier correctly * pull suggestions into its own testable file * add first test * add ci workflow * Create .nvmrc * --legacy-peer-deps
1 parent 46a9101 commit 3f1937f

8 files changed

Lines changed: 2587 additions & 524 deletions

File tree

.eslintrc.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ module.exports = {
66
plugins: ['@typescript-eslint'],
77
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:github/recommended'],
88
rules: {
9-
'prettier/prettier': ['error', { singleQuote: true, trailingComma: 'none', printWidth: 120 }],
10-
'import/no-unresolved': ['error', { ignore: ['vscode'] }],
9+
'import/no-unresolved': ['error', {ignore: ['vscode']}],
1110
// Overrides from updating plugin:github
1211
'filenames/match-regex': 'off',
1312
'import/no-commonjs': 'off',
14-
'i18n-text/no-en': 'off'
15-
}
16-
};
13+
'i18n-text/no-en': 'off',
14+
},
15+
}

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
14+
- name: Set up Node.js
15+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
16+
with:
17+
node-version-file: '.nvmrc'
18+
cache: 'npm'
19+
- name: Install dependencies
20+
run: npm ci --legacy-peer-deps
21+
- name: Build
22+
run: npm run build
23+
- name: Run tests defined in vitest
24+
run: npm test

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v24

0 commit comments

Comments
 (0)