Skip to content

Commit

Permalink
test: migrate to Jest (#77)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Drop support for Node 8
  • Loading branch information
Hoishin committed Oct 6, 2020
1 parent 546bc41 commit b0a8506
Show file tree
Hide file tree
Showing 39 changed files with 9,627 additions and 3,171 deletions.
7 changes: 4 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
coverage
dist
/node_modules
/coverage
/dist
/test/fixtures
8 changes: 0 additions & 8 deletions .eslintrc

This file was deleted.

11 changes: 11 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"root": true,
"extends": ["xo", "xo-typescript", "prettier", "prettier/@typescript-eslint"],
"rules": {
"capitalized-comments": 0,
"@typescript-eslint/no-floating-promises": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-implicit-any-catch": 0,
"@typescript-eslint/promise-function-async": 0
}
}
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node-version: [10.x, 12.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -22,8 +20,16 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ matrix.node-version }}
- run: npm i -g bower
- run: npm ci
- run: npm run static
- run: npm test
- run: npm run coveralls
- uses: coverallsapp/github-action@master
with:
github-token: ${{ github.token }}
- run: npm run build

4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules
/coverage
/dist
/test/fixtures
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[NodeCG](https://github.com/nodecg/nodecg)'s command line interface.

[![Build Status](https://travis-ci.org/nodecg/nodecg-cli.svg?branch=master)](https://travis-ci.org/nodecg/nodecg-cli)
![CI](https://github.com/nodecg/nodecg-cli/workflows/CI/badge.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/nodecg/nodecg-cli/badge.svg?branch=master)](https://coveralls.io/github/nodecg/nodecg-cli?branch=master)

## Installation
Expand Down
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node'
};
Loading

0 comments on commit b0a8506

Please sign in to comment.