@@ -88,44 +88,7 @@ describe('--- Day 1: Trebuchet?! ---', () => {
88
88
} )
89
89
} )
90
90
91
- // it('doesn`t sanitize by default', () => {
92
- // const set = [
93
- // 'two1nine',
94
- // 'eightwothree',
95
- // 'abcone2threexyz',
96
- // 'xtwone3four',
97
- // '4nineeightseven2',
98
- // 'zoneight234',
99
- // '7pqrstsixteen'
100
- // ]
101
- // expect(checksumSet(set)).to.be.NaN
102
- // })
103
- // it('allows for sanitizing to be explicitly disabled', () => {
104
- // const set = [
105
- // 'two1nine',
106
- // 'eightwothree',
107
- // 'abcone2threexyz',
108
- // 'xtwone3four',
109
- // '4nineeightseven2',
110
- // 'zoneight234',
111
- // '7pqrstsixteen'
112
- // ]
113
- // expect(checksumSet(set, 'none')).to.be.NaN
114
- // })
115
- // // it('calculates the checksum for a set of lines by summing the checksum of each line', () => {
116
- // // const set = [
117
- // // 'two1nine',
118
- // // 'eightwothree',
119
- // // 'abcone2threexyz',
120
- // // 'xtwone3four',
121
- // // '4nineeightseven2',
122
- // // 'zoneight234',
123
- // // '7pqrstsixteen'
124
- // // ]
125
- // // expect(checksumSet(set)).to.equal(281)
126
- // // })
127
- // })
128
- describe ( 'integeration' , ( ) => {
91
+ describe . skip ( 'integeration' , ( ) => {
129
92
let initData
130
93
before ( ( done ) => {
131
94
fs . readFile ( filePath , { encoding : 'utf8' } , ( err , rawData ) => {
@@ -139,19 +102,19 @@ describe('--- Day 1: Trebuchet?! ---', () => {
139
102
140
103
it ( 'is not done without sanitation, since that matches part 1' , ( ) => {
141
104
const data = JSON . parse ( JSON . stringify ( initData ) )
142
- const result = checksumSet ( data , true )
105
+ const result = checksumSet ( data , false , true )
143
106
expect ( result ) . to . not . equal ( 54953 )
144
107
} )
145
108
146
109
it ( 'is not done with a one-time regex' , ( ) => {
147
110
const data = JSON . parse ( JSON . stringify ( initData ) )
148
- const result = checksumSet ( data , true )
111
+ const result = checksumSet ( data , false , true )
149
112
expect ( result ) . to . not . equal ( 53885 ) // result of one-time regex
150
113
} )
151
114
152
115
it ( 'is not done by sanitizing just the first and last strings' , ( ) => {
153
116
const data = JSON . parse ( JSON . stringify ( initData ) )
154
- const result = checksumSet ( data , true )
117
+ const result = checksumSet ( data , false , true )
155
118
expect ( result ) . to . not . equal ( 53853 ) // result of first/last substitution onlye
156
119
} )
157
120
} )
0 commit comments