Skip to content

Commit dd069a4

Browse files
wip(tests): try to enhance "should not hang on cycles" test
1 parent 96cf6c1 commit dd069a4

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

tests/basic.test.js

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -505,44 +505,47 @@ test('should use cache', async () => {
505505
});
506506

507507

508-
509508
/*
510-
xtest('should not hang on cycles', async () => {
509+
test('should not hang on cycles', async () => {
511510
512511
const { page, output } = await createPage({
513512
files: {
514513
...defaultFiles,
515514
'/component.vue': `
516515
<script>
517-
import bar from '/foo.vue';
518-
519-
console.log('component');
520-
521-
export default {
522-
}
516+
import '/pre.vue';
517+
import '/foo.vue';
518+
console.log('component');
519+
</script>
520+
`,
521+
'/pre.vue': `
522+
<script>
523+
console.log('pre');
523524
</script>
524525
`,
525-
526526
'/foo.vue': `
527527
<script>
528-
import component from '/component.vue';
529-
530-
console.log('foo');
531-
532-
export default {
533-
}
528+
import '/bar.vue';
529+
console.log('foo');
530+
</script>
531+
`,
532+
'/bar.vue': `
533+
<script>
534+
import '/foo.vue';
535+
console.log('bar');
534536
</script>
535537
`,
536538
}
537539
});
538540
539-
expect(output.filter(e => e.type === 'log').map(e => e.content).flat().join(',')).toBe('component,foo');
541+
expect(output.filter(e => e.type === 'log').map(e => e.content).flat().join(',')).toBe('pre');
540542
541543
await page.close();
542544
});
545+
*/
543546

544547

545-
548+
/*
546549
xtest('should handle cycles', async () => {
547550
548551
const { page, output } = await createPage({

0 commit comments

Comments
 (0)