Skip to content

Commit bb5228a

Browse files
committed
4/13
1 parent c50a092 commit bb5228a

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

lab3/main_test.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
1-
const { describe, test } = require('node:test');
1+
const { describe, it } = require('node:test');
22
const assert = require('assert');
33
const { Calculator } = require('./main');
44

5-
describe('Calculator', () => {
6-
const calc = new Calculator();
7-
test('exp', () => {
8-
assert.strictEqual(calc.exp(0),1);
9-
assert.throws(() => calc.exp('hello'), Error, 'unsupported operand type');
10-
assert.throws(() => calc.exp(10000), Error, 'overflow');
11-
});
12-
13-
test('exp', () => {
14-
assert.strictEqual(calc.log(1),0);
15-
assert.throws(() => calc.log(-1), Error, 'math domain error (2)');
16-
assert.throws(() => calc.log(0), Error, 'math domain error (1)');
17-
assert.throws(() => calc.log('a'), Error, 'unsupported operand type');
18-
});
19-
});

0 commit comments

Comments
 (0)