@@ -397,175 +397,6 @@ mod prune {
397397 }
398398}
399399
400- #[ cfg( not( target_os = "linux" ) ) ]
401- mod prune_node {
402- use super :: * ;
403-
404- #[ test]
405- fn focuses_for_npm ( ) {
406- let ( workspace_config, toolchain_config, tasks_config) =
407- get_node_depman_fixture_configs ( "npm" ) ;
408-
409- let sandbox = create_sandbox_with_config (
410- "node-npm/workspaces" ,
411- Some ( workspace_config) ,
412- Some ( toolchain_config) ,
413- Some ( tasks_config) ,
414- ) ;
415-
416- write_manifest ( sandbox. path ( ) , "other" ) ;
417-
418- sandbox
419- . run_moon ( |cmd| {
420- cmd. arg ( "docker" ) . arg ( "prune" ) ;
421- } )
422- . debug ( ) ;
423-
424- // should exist
425- assert ! ( sandbox. path( ) . join( "node_modules/solid-js" ) . exists( ) ) ;
426-
427- // should not exist
428- assert ! ( !sandbox. path( ) . join( "npm/node_modules" ) . exists( ) ) ;
429- assert ! (
430- !sandbox
431- . path( )
432- . join( "node_modules/babel-preset-solid" )
433- . exists( )
434- ) ;
435-
436- // npm installs prod deps for unfocused
437- // assert!(!sandbox.path().join("node_modules/react").exists());
438- }
439-
440- #[ test]
441- fn focuses_for_pnpm ( ) {
442- let ( workspace_config, toolchain_config, tasks_config) =
443- get_node_depman_fixture_configs ( "pnpm" ) ;
444-
445- let sandbox = create_sandbox_with_config (
446- "node-pnpm/workspaces" ,
447- Some ( workspace_config) ,
448- Some ( toolchain_config) ,
449- Some ( tasks_config) ,
450- ) ;
451-
452- write_manifest ( sandbox. path ( ) , "other" ) ;
453-
454- sandbox. run_moon ( |cmd| {
455- cmd. arg ( "docker" ) . arg ( "prune" ) ;
456- } ) ;
457-
458- // should exist
459- assert ! ( sandbox. path( ) . join( "other/node_modules/solid-js" ) . exists( ) ) ;
460-
461- // should not exist
462- assert ! ( !sandbox. path( ) . join( "pnpm/node_modules" ) . exists( ) ) ;
463- assert ! (
464- !sandbox
465- . path( )
466- . join( "node_modules/babel-preset-solid" )
467- . exists( )
468- ) ;
469- assert ! ( !sandbox. path( ) . join( "node_modules/react" ) . exists( ) ) ;
470- }
471-
472- #[ test]
473- fn focuses_for_yarn ( ) {
474- let ( workspace_config, toolchain_config, tasks_config) =
475- get_node_depman_fixture_configs ( "yarn" ) ;
476-
477- let sandbox = create_sandbox_with_config (
478- "node-yarn/workspaces" ,
479- Some ( workspace_config) ,
480- Some ( toolchain_config) ,
481- Some ( tasks_config) ,
482- ) ;
483-
484- write_manifest ( sandbox. path ( ) , "other" ) ;
485-
486- sandbox. run_moon ( |cmd| {
487- cmd. arg ( "docker" ) . arg ( "prune" ) ;
488- } ) ;
489-
490- // should exist
491- assert ! ( sandbox. path( ) . join( "node_modules/solid-js" ) . exists( ) ) ;
492-
493- // should not exist
494- assert ! ( !sandbox. path( ) . join( "npm/node_modules" ) . exists( ) ) ;
495- assert ! (
496- !sandbox
497- . path( )
498- . join( "node_modules/babel-preset-solid" )
499- . exists( )
500- ) ;
501- assert ! ( !sandbox. path( ) . join( "node_modules/react" ) . exists( ) ) ;
502- }
503-
504- #[ test]
505- fn focuses_for_yarn1 ( ) {
506- let ( workspace_config, toolchain_config, tasks_config) =
507- get_node_depman_fixture_configs ( "yarn1" ) ;
508-
509- let sandbox = create_sandbox_with_config (
510- "node-yarn1/workspaces" ,
511- Some ( workspace_config) ,
512- Some ( toolchain_config) ,
513- Some ( tasks_config) ,
514- ) ;
515-
516- write_manifest ( sandbox. path ( ) , "other" ) ;
517-
518- sandbox. run_moon ( |cmd| {
519- cmd. arg ( "docker" ) . arg ( "prune" ) ;
520- } ) ;
521-
522- // should exist
523- assert ! ( sandbox. path( ) . join( "node_modules/solid-js" ) . exists( ) ) ;
524-
525- // should not exist
526- assert ! ( !sandbox. path( ) . join( "yarn/node_modules" ) . exists( ) ) ;
527- assert ! (
528- !sandbox
529- . path( )
530- . join( "node_modules/babel-preset-solid" )
531- . exists( )
532- ) ;
533-
534- // yarn 1 does not support focusing
535- // assert!(!sandbox.path().join("node_modules/react").exists());
536- }
537-
538- // #[test]
539- // fn focuses_for_node_bun() {
540- // let (workspace_config, toolchain_config, tasks_config) =
541- // get_node_depman_fixture_configs("bun");
542-
543- // let sandbox = create_sandbox_with_config(
544- // "node-bun/workspaces",
545- // Some(workspace_config),
546- // Some(toolchain_config),
547- // Some(tasks_config),
548- // );
549-
550- // write_manifest(sandbox.path(), "other");
551-
552- // sandbox.run_moon(|cmd| {
553- // cmd.arg("docker").arg("prune");
554- // });
555-
556- // // should exist
557- // assert!(sandbox.path().join("other/node_modules/solid-js").exists());
558-
559- // // should not exist
560- // assert!(!sandbox.path().join("pnpm/node_modules").exists());
561- // assert!(!sandbox
562- // .path()
563- // .join("node_modules/babel-preset-solid")
564- // .exists());
565- // assert!(!sandbox.path().join("node_modules/react").exists());
566- // }
567- }
568-
569400mod setup {
570401 use super :: * ;
571402
0 commit comments