File tree 2 files changed +5
-5
lines changed 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { commands } from './day-02-dive.input';
4
4
describe ( 'Day 2 - Dive' , ( ) => {
5
5
test ( 'should throw Error for unknown commands' , ( ) => {
6
6
const measurer = new DiverCommandsInterpreter ( [ [ 'unknown' , 1 ] ] ) ;
7
- expect ( measurer . computeOffsetFromCommands ) . toThrowError ( ) ;
7
+ expect ( ( ) => measurer . computeOffsetFromCommands ( ) ) . toThrowError ( ) ;
8
8
} ) ;
9
9
test ( 'should return [0, 0] for no commands' , ( ) => {
10
10
const measurer = new DiverCommandsInterpreter ( [ ] ) ;
Original file line number Diff line number Diff line change 1
- import DiagnosticReportCalculator from './day-03-binary-diagnostic' ;
1
+ import { DiagnosticReportCalculator } from './day-03-binary-diagnostic' ;
2
2
import { binaryNumbers } from './day-03-binary-diagnostic.input' ;
3
3
4
4
describe ( 'Day 3 - Binary Diagnostic' , ( ) => {
5
5
test ( 'should throw Error for empty readings' , ( ) => {
6
6
const calculator = new DiagnosticReportCalculator ( [ ] ) ;
7
- expect ( calculator . computeEpsilonAndGamma ) . toThrowError ( ) ;
7
+ expect ( ( ) => calculator . computeEpsilonAndGamma ( ) ) . toThrowError ( ) ;
8
8
} ) ;
9
9
test ( 'should throw Error for inconsistent reading lengths' , ( ) => {
10
- const calculator = new DiagnosticReportCalculator ( [ '1' , '11 ' ] ) ;
11
- expect ( calculator . computeEpsilonAndGamma ) . toThrowError ( ) ;
10
+ const calculator = new DiagnosticReportCalculator ( [ '1' , '01 ' ] ) ;
11
+ expect ( ( ) => calculator . computeEpsilonAndGamma ( ) ) . toThrowError ( ) ;
12
12
} ) ;
13
13
test ( 'should return 2743844 for puzzle part 1 answer' , ( ) => {
14
14
const calculator = new DiagnosticReportCalculator ( binaryNumbers ) ;
You can’t perform that action at this time.
0 commit comments