Skip to content

Commit 5d0cdcd

Browse files
XhmikosRJustinBeckwith
andauthoredJan 24, 2021
build: CI: specify FORCE_COLOR: 2 (#257)
Co-authored-by: Justin Beckwith <beckwith@google.com>
1 parent 9d98693 commit 5d0cdcd

File tree

4 files changed

+68
-9
lines changed

4 files changed

+68
-9
lines changed
 

‎.github/workflows/ci.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
pull_request:
66
name: ci
77
env:
8+
FORCE_COLOR: 2
89
NODE: 14
910
jobs:
1011
test:

‎package-lock.json

+63-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"pkg": "^4.4.9",
5454
"semantic-release": "^17.0.0",
5555
"sinon": "^9.0.0",
56+
"strip-ansi": "^6.0.0",
5657
"typescript": "^4.0.0"
5758
},
5859
"engines": {

‎test/test.cli.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as execa from 'execa';
33
import {assert} from 'chai';
44
import * as http from 'http';
55
import * as util from 'util';
6+
import stripAnsi = require('strip-ansi');
67
import enableDestroy = require('server-destroy');
78
import {LinkResult, LinkState} from '../src/index';
89

@@ -25,7 +26,7 @@ describe('cli', function () {
2526
const res = await execa(node, [linkinator, 'test/fixtures/basic'], {
2627
reject: false,
2728
});
28-
assert.match(res.stderr, /ERROR: Detected 1 broken links/);
29+
assert.match(stripAnsi(res.stderr), /ERROR: Detected 1 broken links/);
2930
});
3031

3132
it('should pass successful markdown scan', async () => {
@@ -61,7 +62,7 @@ describe('cli', function () {
6162
'"LICENSE.md, unlinked.md"',
6263
'test/fixtures/markdown/README.md',
6364
]);
64-
assert.match(res.stdout, /\[SKP\]/);
65+
assert.match(stripAnsi(res.stdout), /\[SKP\]/);
6566
});
6667

6768
it('should provide CSV if asked nicely', async () => {

0 commit comments

Comments
 (0)
Please sign in to comment.