Skip to content

Commit e615512

Browse files
committed
wip: merge prep
1 parent 899536c commit e615512

File tree

6 files changed

+5
-31
lines changed

6 files changed

+5
-31
lines changed

jest.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ module.exports = {
4343
classNameTemplate: '{classname}',
4444
titleTemplate: '{title}',
4545
addFileAttribute: 'true',
46-
includeConsoleOutput: 'true',
4746
}],
4847
],
4948
collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}', '!src/**/*.d.ts'],

package-lock.json

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"typescript-demo-lib": "ts-node -r tsconfig-paths/register --compiler typescript-cached-transpile --transpile-only src/bin/typescript-demo-lib.ts"
3535
},
3636
"dependencies": {
37-
"@matrixai/logger": "^2.2.2",
3837
"fd-lock": "^1.2.0",
3938
"level": "^7.0.0",
4039
"threads": "^1.6.5",

scripts/build-pipelines.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ build:linux:
5757
- >
5858
nix-shell --run '
5959
npm run build --verbose;
60-
npm test -- --ci --runInBand --coverage --verbose=false --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL;
60+
npm test -- --ci --runInBand --coverage --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL;
6161
'
6262
artifacts:
6363
when: always
@@ -95,7 +95,7 @@ build:windows:
9595
- npm install --ignore-scripts
9696
- $env:Path = "$(npm bin);" + $env:Path
9797
- npm run build --verbose
98-
- npm test -- --ci --runInBand --verbose=false --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
98+
- npm test -- --ci --runInBand --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
9999
artifacts:
100100
when: always
101101
reports:
@@ -130,7 +130,7 @@ build:macos:
130130
- npm install --ignore-scripts
131131
- export PATH="$(npm bin):$PATH"
132132
- npm run build --verbose
133-
- npm test -- --ci --runInBand --verbose=false --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
133+
- npm test -- --ci --runInBand --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
134134
artifacts:
135135
when: always
136136
reports:

scripts/test-pipelines.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ check:test:
5252
- >
5353
nix-shell --run '
5454
npm run build --verbose;
55-
npm test -- --ci --runInBand --coverage --verbose=false --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL;
55+
npm test -- --ci --runInBand --coverage --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL;
5656
'
5757
artifacts:
5858
when: always

tests/bin/typescript-demo-lib.test.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import fs from 'fs';
22
import os from 'os';
33
import path from 'path';
4-
import Logger, { ConsoleHandler, LogLevel } from '@matrixai/logger';
54
import { mockProcessStdout } from 'jest-mock-process';
65
import main from '@/bin/typescript-demo-lib';
76

@@ -10,12 +9,10 @@ const uuidRegex = new RegExp(
109
);
1110

1211
let dataDir: string;
13-
let logger: Logger;
1412

1513
describe('main', () => {
1614
beforeEach(async () => {
1715
dataDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), 'test-'));
18-
logger = new Logger('main', LogLevel.INFO, [new ConsoleHandler()]);
1916
});
2017
afterEach(async () => {
2118
await fs.promises.rm(dataDir, {
@@ -30,20 +27,16 @@ describe('main', () => {
3027
mockLog.mockRestore();
3128
});
3229
test('no input', async () => {
33-
logger.info('This test should fail');
34-
console.log('hello???');
3530
const mockLog = mockProcessStdout();
3631
await main([]);
3732
const tmpMockLog = mockLog.mock.calls.join('');
3833
expect(tmpMockLog).toContain('[]\n');
3934
expect(tmpMockLog).toContain('new library\n');
4035
expect(tmpMockLog).toMatch(uuidRegex);
41-
expect(tmpMockLog).toContain('0 + 0 = 1\n');
36+
expect(tmpMockLog).toContain('0 + 0 = 0\n');
4237
mockLog.mockRestore();
4338
});
4439
test('adds 0 + 0', async () => {
45-
logger.info('This test should pass');
46-
console.log('hello???');
4740
const mockLog = mockProcessStdout();
4841
await main(['', '', '0', '0', dataDir]);
4942
const tmpMockLog = mockLog.mock.calls.join('');
@@ -107,10 +100,4 @@ describe('main', () => {
107100
expect(tmpMockLog).toContain('hello UTP!!');
108101
mockLog.mockRestore();
109102
});
110-
test('test logger', () => {
111-
logger.info('With logger');
112-
console.error('With console.error');
113-
console.log('With console.log');
114-
expect(3).toBe(4);
115-
})
116103
});

0 commit comments

Comments
 (0)