Skip to content

Commit 765e46d

Browse files
kyranetfavnaiCrawl
authored
feat: added message formatters (#1)
Co-authored-by: Jeroen Claassens <[email protected]> Co-authored-by: Noel <[email protected]>
1 parent 8fcdfe1 commit 765e46d

File tree

10 files changed

+13639
-5081
lines changed

10 files changed

+13639
-5081
lines changed

.github/workflows/test.yml

+24
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,30 @@ jobs:
1919
- name: Run ESLint
2020
run: npm run test:lint
2121

22+
test:
23+
name: Test
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v2
28+
29+
- name: Install Node v16
30+
uses: actions/setup-node@v2
31+
with:
32+
node-version: 16
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Build TypeScript
38+
run: npm run build
39+
40+
- name: Run Tests
41+
run: npm run test:ci
42+
43+
- name: Upload Coverage
44+
uses: codecov/codecov-action@v1
45+
2246
typescript:
2347
name: TypeScript
2448
runs-on: ubuntu-latest

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ typings/index.js
2323

2424
# Autogenerated
2525
CHANGELOG.md
26+
coverage/
2627
dist/

babel.config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
parserOpts: { strictMode: true },
3+
sourceMaps: 'inline',
4+
presets: [
5+
[
6+
'@babel/preset-env',
7+
{
8+
targets: { node: 'current' },
9+
modules: 'commonjs',
10+
},
11+
],
12+
'@babel/preset-typescript',
13+
],
14+
};

codecov.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 70%
6+
threshold: 5%
7+
patch:
8+
default:
9+
target: 70%
10+
threshold: 5%

jest.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
testMatch: ['<rootDir>/tests/**/*.test.ts'],
3+
testEnvironment: 'node',
4+
collectCoverage: true,
5+
collectCoverageFrom: ['src/**/*.ts'],
6+
coverageDirectory: 'coverage',
7+
coverageReporters: ['text', 'lcov', 'clover'],
8+
coverageThreshold: {
9+
global: {
10+
branches: 70,
11+
lines: 70,
12+
statements: 70,
13+
},
14+
},
15+
};

0 commit comments

Comments
 (0)