@@ -3,16 +3,29 @@ describe("server-function", () => {
33 cy . visit ( "/" ) ;
44 cy . get ( "#server-fn-test" ) . contains ( '{"clientWithIsServer":false}' ) ;
55 } )
6- it ( "should have isServer true in the server function" , ( ) => {
7- cy . visit ( "/is-server" ) ;
6+ it ( "should have isServer true in the server function - nested " , ( ) => {
7+ cy . visit ( "/is-server-nested " ) ;
88 cy . get ( "#server-fn-test" ) . contains ( '{"serverFnWithIsServer":true}' ) ;
99 } )
10- it ( "should externalize node builtin in server function" , ( ) => {
11- cy . visit ( "/node-builtin" ) ;
10+ it ( "should externalize node builtin in server function - nested " , ( ) => {
11+ cy . visit ( "/node-builtin-nested " ) ;
1212 cy . get ( "#server-fn-test" ) . contains ( '{"serverFnWithNodeBuiltin":"can/externalize"}' ) ;
1313 } )
14- it ( "should externalize npm module in server function" , ( ) => {
15- cy . visit ( "npm-module" ) ;
14+ it ( "should externalize npm module in server function - nested" , ( ) => {
15+ cy . visit ( "npm-module-nested" ) ;
16+ cy . get ( "#server-fn-test" ) . contains ( '{"serverFnWithNpmModule":[2,4,6]}' ) ;
17+ } )
18+
19+ it ( "should have isServer true in the server function - toplevel" , ( ) => {
20+ cy . visit ( "/is-server-toplevel" ) ;
21+ cy . get ( "#server-fn-test" ) . contains ( '{"serverFnWithIsServer":true}' ) ;
22+ } )
23+ it ( "should externalize node builtin in server function - toplevel" , ( ) => {
24+ cy . visit ( "/node-builtin-toplevel" ) ;
25+ cy . get ( "#server-fn-test" ) . contains ( '{"serverFnWithNodeBuiltin":"can/externalize"}' ) ;
26+ } )
27+ it ( "should externalize npm module in server function - toplevel" , ( ) => {
28+ cy . visit ( "npm-module-toplevel" ) ;
1629 cy . get ( "#server-fn-test" ) . contains ( '{"serverFnWithNpmModule":[2,4,6]}' ) ;
1730 } )
1831} ) ;
0 commit comments