@@ -5,37 +5,37 @@ import { snackRequireContextVirtualModuleBabelPlugin } from '../babel';
55describe ( snackRequireContextVirtualModuleBabelPlugin , ( ) => {
66 it ( `creates virtual module for require.context('./app')` , ( ) => {
77 expect ( transpile ( `require.context('./app')` ) ) . toMatchInlineSnapshot (
8- `"require(\\ "./app?ctx=eyJyIjp0cnVlLCJtIjoiLioiLCJvIjoic3luYyJ9\\ ");"` ,
8+ `"require("./app?ctx=eyJyIjp0cnVlLCJtIjoiLioiLCJvIjoic3luYyJ9");"` ,
99 ) ;
1010 } ) ;
1111
1212 it ( `creates virtual module for require.context('module://components')` , ( ) => {
1313 expect ( transpile ( `require.context('module://components')` ) ) . toMatchInlineSnapshot (
14- `"require(\\ "module://components?ctx=eyJyIjp0cnVlLCJtIjoiLioiLCJvIjoic3luYyJ9\\ ");"` ,
14+ `"require("module://components?ctx=eyJyIjp0cnVlLCJtIjoiLioiLCJvIjoic3luYyJ9");"` ,
1515 ) ;
1616 } ) ;
1717
1818 it ( 'creates virtual module for require.context("./app", false)' , ( ) => {
1919 expect ( transpile ( `require.context('./app', false)` ) ) . toMatchInlineSnapshot (
20- `"require(\\ "./app?ctx=eyJyIjpmYWxzZSwibSI6Ii4qIiwibyI6InN5bmMifQ\\ ");"` ,
20+ `"require("./app?ctx=eyJyIjpmYWxzZSwibSI6Ii4qIiwibyI6InN5bmMifQ");"` ,
2121 ) ;
2222 } ) ;
2323
2424 it ( 'creates virtual module for require.context("./app", false, /\\.mdx$/)' , ( ) => {
2525 expect ( transpile ( `require.context('./app', false, /\\.mdx$/)` ) ) . toMatchInlineSnapshot (
26- `"require(\\ "./app?ctx=eyJyIjpmYWxzZSwibSI6IlxcLm1keCQiLCJvIjoic3luYyJ9\\ ");"` ,
26+ `"require("./app?ctx=eyJyIjpmYWxzZSwibSI6IlxcLm1keCQiLCJvIjoic3luYyJ9");"` ,
2727 ) ;
2828 } ) ;
2929
3030 it ( 'creates virtual module for require.context("./app", false, /\\.mdx$/, "async")' , ( ) => {
3131 expect ( transpile ( `require.context('./app', false, /\\.mdx$/, 'async')` ) ) . toMatchInlineSnapshot (
32- `"require(\\ "./app?ctx=eyJyIjpmYWxzZSwibSI6IlxcLm1keCQiLCJvIjoiYXN5bmMifQ\\ ");"` ,
32+ `"require("./app?ctx=eyJyIjpmYWxzZSwibSI6IlxcLm1keCQiLCJvIjoiYXN5bmMifQ");"` ,
3333 ) ;
3434 } ) ;
3535
3636 it ( 'creates virtual module for require.context(EXPO_ROUTER_APP_ROOT)' , ( ) => {
3737 expect ( transpile ( `require.context(process.env.EXPO_ROUTER_APP_ROOT)` ) ) . toMatchInlineSnapshot (
38- `"require(\\ "module://app?ctx=eyJyIjp0cnVlLCJtIjoiLioiLCJvIjoic3luYyJ9\\ ");"` ,
38+ `"require("module://app?ctx=eyJyIjp0cnVlLCJtIjoiLioiLCJvIjoic3luYyJ9");"` ,
3939 ) ;
4040 } ) ;
4141
@@ -50,7 +50,7 @@ describe(snackRequireContextVirtualModuleBabelPlugin, () => {
5050 ` ;
5151
5252 expect ( transpile ( code , { EXPO_ROUTER_IMPORT_MODE : 'async' } ) ) . toMatchInlineSnapshot (
53- `"require(\\ "module://app?ctx=eyJyIjp0cnVlLCJtIjoiLioiLCJvIjoiYXN5bmMifQ\\ ");"` ,
53+ `"require("module://app?ctx=eyJyIjp0cnVlLCJtIjoiLioiLCJvIjoiYXN5bmMifQ");"` ,
5454 ) ;
5555 } ) ;
5656
0 commit comments