@@ -42,14 +42,8 @@ const formatter = proxyquire("../../../../lib/cli-engine/formatters/codeframe",
42
42
//------------------------------------------------------------------------------
43
43
44
44
describe ( "formatter:codeframe" , ( ) => {
45
- let sandbox ;
46
-
47
- beforeEach ( ( ) => {
48
- sandbox = sinon . sandbox . create ( ) ;
49
- } ) ;
50
-
51
45
afterEach ( ( ) => {
52
- sandbox . verifyAndRestore ( ) ;
46
+ sinon . verifyAndRestore ( ) ;
53
47
} ) ;
54
48
55
49
describe ( "when passed no messages" , ( ) => {
@@ -99,8 +93,8 @@ describe("formatter:codeframe", () => {
99
93
} ) ;
100
94
101
95
it ( "should return bold yellow summary when there are only warnings" , ( ) => {
102
- sandbox . spy ( chalkStub . yellow , "bold" ) ;
103
- sandbox . spy ( chalkStub . red , "bold" ) ;
96
+ sinon . spy ( chalkStub . yellow , "bold" ) ;
97
+ sinon . spy ( chalkStub . red , "bold" ) ;
104
98
105
99
formatter ( code ) ;
106
100
@@ -160,8 +154,8 @@ describe("formatter:codeframe", () => {
160
154
} ) ;
161
155
162
156
it ( "should return bold red summary when there are errors" , ( ) => {
163
- sandbox . spy ( chalkStub . yellow , "bold" ) ;
164
- sandbox . spy ( chalkStub . red , "bold" ) ;
157
+ sinon . spy ( chalkStub . yellow , "bold" ) ;
158
+ sinon . spy ( chalkStub . red , "bold" ) ;
165
159
166
160
formatter ( code ) ;
167
161
@@ -230,8 +224,8 @@ describe("formatter:codeframe", () => {
230
224
} ) ;
231
225
232
226
it ( "should return bold red summary when at least 1 of the messages is an error" , ( ) => {
233
- sandbox . spy ( chalkStub . yellow , "bold" ) ;
234
- sandbox . spy ( chalkStub . red , "bold" ) ;
227
+ sinon . spy ( chalkStub . yellow , "bold" ) ;
228
+ sinon . spy ( chalkStub . red , "bold" ) ;
235
229
code [ 0 ] . messages [ 0 ] . severity = 1 ;
236
230
code [ 0 ] . warningCount = 1 ;
237
231
code [ 0 ] . errorCount = 1 ;
0 commit comments