11import { testSuite , expect } from 'manten' ;
22import { createFixture } from 'fs-fixture' ;
3- import { outdent } from 'outdent' ;
43import type { NodeApis } from '../utils/node-with-loader.js' ;
54
65const jsonFixture = {
@@ -27,13 +26,7 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
2726
2827 test ( 'Import' , async ( ) => {
2928 const nodeProcess = await node . importFile ( fixture . path , './index.json' ) ;
30- expect ( nodeProcess . stdout ) . toMatch (
31- outdent `
32- [Module: null prototype] {
33- default: { loaded: 'json' },
34- loaded: 'json'
35- }` ,
36- ) ;
29+ expect ( nodeProcess . stdout ) . toMatch ( 'default: { loaded: \'json\' }' ) ;
3730 } ) ;
3831 } ) ;
3932
@@ -46,13 +39,7 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
4639
4740 test ( 'Import' , async ( ) => {
4841 const nodeProcess = await node . importFile ( fixture . path , './index' ) ;
49- expect ( nodeProcess . stdout ) . toMatch (
50- outdent `
51- [Module: null prototype] {
52- default: { loaded: 'json' },
53- loaded: 'json'
54- }` ,
55- ) ;
42+ expect ( nodeProcess . stdout ) . toMatch ( 'default: { loaded: \'json\' }' ) ;
5643 } ) ;
5744 } ) ;
5845
@@ -68,13 +55,7 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
6855
6956 test ( 'Import' , async ( ) => {
7057 const nodeProcess = await node . importFile ( fixture . path , '.' ) ;
71- expect ( nodeProcess . stdout ) . toMatch (
72- outdent `
73- [Module: null prototype] {
74- default: { loaded: 'json' },
75- loaded: 'json'
76- }` ,
77- ) ;
58+ expect ( nodeProcess . stdout ) . toMatch ( 'default: { loaded: \'json\' }' ) ;
7859 } ) ;
7960 } ) ;
8061
@@ -97,13 +78,7 @@ export default testSuite(async ({ describe }, node: NodeApis) => {
9778
9879 test ( 'Import' , async ( ) => {
9980 const nodeProcess = await node . importFile ( fixture . path , './index' ) ;
100- expect ( nodeProcess . stdout ) . toMatch (
101- outdent `
102- [Module: null prototype] {
103- default: { loaded: 'json' },
104- loaded: 'json'
105- }` ,
106- ) ;
81+ expect ( nodeProcess . stdout ) . toMatch ( 'default: { loaded: \'json\' }' ) ;
10782 } ) ;
10883 } ) ;
10984
0 commit comments