@@ -33,31 +33,31 @@ test('default quote type is single', () => {
33
33
test ( 'single quotes used when single quote type provided' , ( ) => {
34
34
const ast = load ( test_code ) ;
35
35
clean ( ast ) ;
36
- const code = print ( ast , { quote : 'single' } ) . code ;
36
+ const code = print ( ast , { quotes : 'single' } ) . code ;
37
37
38
38
expect ( code ) . toMatchInlineSnapshot ( `"const foo = 'bar';"` ) ;
39
39
} ) ;
40
40
41
41
test ( 'double quotes used when double quote type provided' , ( ) => {
42
42
const ast = load ( test_code ) ;
43
43
clean ( ast ) ;
44
- const code = print ( ast , { quote : 'double' } ) . code ;
44
+ const code = print ( ast , { quotes : 'double' } ) . code ;
45
45
46
46
expect ( code ) . toMatchInlineSnapshot ( `"const foo = "bar";"` ) ;
47
47
} ) ;
48
48
49
49
test ( 'escape single quotes if present in string literal' , ( ) => {
50
50
const ast = load ( 'const foo = "b\'ar"' ) ;
51
51
clean ( ast ) ;
52
- const code = print ( ast , { quote : 'single' } ) . code ;
52
+ const code = print ( ast , { quotes : 'single' } ) . code ;
53
53
54
54
expect ( code ) . toMatchInlineSnapshot ( `"const foo = 'b\\'ar';"` ) ;
55
55
} ) ;
56
56
57
57
test ( 'escape double quotes if present in string literal' , ( ) => {
58
58
const ast = load ( "const foo = 'b\"ar'" ) ;
59
59
clean ( ast ) ;
60
- const code = print ( ast , { quote : 'double' } ) . code ;
60
+ const code = print ( ast , { quotes : 'double' } ) . code ;
61
61
62
62
expect ( code ) . toMatchInlineSnapshot ( `"const foo = "b\\"ar";"` ) ;
63
63
} ) ;
0 commit comments