File tree Expand file tree Collapse file tree 3 files changed +6
-47
lines changed Expand file tree Collapse file tree 3 files changed +6
-47
lines changed Original file line number Diff line number Diff line change @@ -455,13 +455,13 @@ pub fn project_new(
455
455
456
456
let options: ProjectOptions = options. into ( ) ;
457
457
let container = turbo_tasks
458
- . run_once ( async move {
458
+ . run ( async move {
459
459
let project = ProjectContainer :: new ( rcstr ! ( "next.js" ) , options. dev ) ;
460
460
let project = project. to_resolved ( ) . await ?;
461
461
project. initialize ( options) . await ?;
462
462
Ok ( project)
463
463
} )
464
- . or_else ( |e| turbopack_ctx. throw_turbopack_internal_result ( & e) )
464
+ . or_else ( |e| turbopack_ctx. throw_turbopack_internal_result ( & e. into ( ) ) )
465
465
. await ?;
466
466
467
467
turbo_tasks. start_once_process ( {
@@ -580,11 +580,11 @@ pub async fn project_update(
580
580
let options = options. into ( ) ;
581
581
let container = project. container ;
582
582
ctx. turbo_tasks ( )
583
- . run_once ( async move {
583
+ . run ( async move {
584
584
container. update ( options) . await ?;
585
585
Ok ( ( ) )
586
586
} )
587
- . or_else ( |e| ctx. throw_turbopack_internal_result ( & e) )
587
+ . or_else ( |e| ctx. throw_turbopack_internal_result ( & e. into ( ) ) )
588
588
. await
589
589
}
590
590
Original file line number Diff line number Diff line change @@ -17,32 +17,9 @@ describe(`app-dir hmr-env`, () => {
17
17
expect ( await browser . elementByCss ( 'p' ) . text ( ) ) . toBe ( 'mac' )
18
18
19
19
await next . patchFile ( envFile , 'MY_DEVICE="ipad"' , async ( ) => {
20
- let logs
21
-
22
- await retry ( async ( ) => {
23
- logs = await browser . log ( )
24
- expect ( logs ) . toEqual (
25
- expect . arrayContaining ( [
26
- expect . objectContaining ( {
27
- message : expect . stringContaining ( '[Fast Refresh] done' ) ,
28
- source : 'log' ,
29
- } ) ,
30
- ] )
31
- )
32
- } )
33
-
34
20
await retry ( async ( ) => {
35
21
expect ( await browser . elementByCss ( 'p' ) . text ( ) ) . toBe ( 'ipad' )
36
22
} )
37
-
38
- expect ( logs ) . toEqual (
39
- expect . arrayContaining ( [
40
- expect . objectContaining ( {
41
- message : expect . stringContaining ( '[Fast Refresh] done in' ) ,
42
- source : 'log' ,
43
- } ) ,
44
- ] )
45
- )
46
23
} )
47
24
48
25
// ensure it's restored back to "mac" before the next test
Original file line number Diff line number Diff line change @@ -76,26 +76,8 @@ describe(`app-dir-hmr`, () => {
76
76
expect ( await browser . elementByCss ( 'p' ) . text ( ) ) . toBe ( 'ipad' )
77
77
} , 5000 /* ms */ )
78
78
79
- expect (
80
- await browser . eval ( 'window.__TEST_NO_RELOAD === undefined' )
81
- ) . toBe ( false )
82
-
83
- const logs = await browser . log ( )
84
- const fastRefreshLogs = logs . filter ( ( log ) => {
85
- return log . message . startsWith ( '[Fast Refresh]' )
86
- } )
87
-
88
- // The exact ordering and number of these messages is implementation
89
- // dependent and subject to race conditions, just check that we have at
90
- // least one "rebuilding" and "done in" message in the logs, the exact
91
- // details are unimportant.
92
- expect ( fastRefreshLogs ) . toEqual (
93
- expect . arrayContaining ( [
94
- {
95
- source : 'log' ,
96
- message : expect . stringContaining ( '[Fast Refresh] done in ' ) ,
97
- } ,
98
- ] )
79
+ expect ( await browser . eval ( 'window.__TEST_NO_RELOAD === true' ) ) . toBe (
80
+ true
99
81
)
100
82
} )
101
83
You can’t perform that action at this time.
0 commit comments