File tree Expand file tree Collapse file tree 1 file changed +20
-17
lines changed Expand file tree Collapse file tree 1 file changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -505,44 +505,47 @@ test('should use cache', async () => {
505
505
} ) ;
506
506
507
507
508
-
509
508
/*
510
- xtest ('should not hang on cycles', async () => {
509
+ test ('should not hang on cycles', async () => {
511
510
512
511
const { page, output } = await createPage({
513
512
files: {
514
513
...defaultFiles,
515
514
'/component.vue': `
516
515
<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');
523
524
</script>
524
525
`,
525
-
526
526
'/foo.vue': `
527
527
<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');
534
536
</script>
535
537
`,
536
538
}
537
539
});
538
540
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 ');
540
542
541
543
await page.close();
542
544
});
545
+ */
543
546
544
547
545
-
548
+ /*
546
549
xtest('should handle cycles', async () => {
547
550
548
551
const { page, output } = await createPage({
You can’t perform that action at this time.
0 commit comments