File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,34 @@ import { ConversionError } from "../errors/conversionError";
7
7
import { ConfigurationError } from "../errors/configurationError" ;
8
8
9
9
describe ( "reportConversionResults" , ( ) => {
10
- it ( "logs a successful conversion when there is one converted rule" , ( ) => {
10
+ it ( "logs a successful conversion without notices when there is one converted rule without notices" , ( ) => {
11
+ // Arrange
12
+ const conversionResults = createEmptyConversionResults ( {
13
+ converted : new Map < string , ESLintRuleOptions > ( [
14
+ [
15
+ "tslint-rule-one" ,
16
+ {
17
+ ruleArguments : [ "a" , "b" ] ,
18
+ ruleName : "tslint-rule-one" ,
19
+ ruleSeverity : "error" ,
20
+ } ,
21
+ ] ,
22
+ ] ) ,
23
+ } ) ;
24
+
25
+ const logger = createStubLogger ( ) ;
26
+
27
+ // Act
28
+ reportConversionResults ( { logger } , conversionResults ) ;
29
+
30
+ // Assert
31
+ expectEqualWrites (
32
+ logger . stdout . write ,
33
+ `✨ 1 rule replaced with its ESLint equivalent. ✨${ EOL } ` ,
34
+ ) ;
35
+ } ) ;
36
+
37
+ it ( "logs a successful conversion with notices when there is one converted rule with notices" , ( ) => {
11
38
// Arrange
12
39
const conversionResults = createEmptyConversionResults ( {
13
40
converted : new Map < string , ESLintRuleOptions > ( [
You can’t perform that action at this time.
0 commit comments