diff --git a/vlib/v/gen/js/jsgen_test.v b/vlib/v/gen/js/jsgen_test.v index 9b3440ff70..a87f8e38af 100644 --- a/vlib/v/gen/js/jsgen_test.v +++ b/vlib/v/gen/js/jsgen_test.v @@ -6,25 +6,23 @@ const ( v_options = '-b js -w' ) +fn testsuite_end() { + os.rmdir_all(output_dir) +} + fn test_example_compilation() { vexe := os.getenv('VEXE') os.chdir(os.dir(vexe)) - os.mkdir_all(output_dir) - files := find_test_files() for file in files { path := os.join_path(test_dir, file) println('Testing $file') - v_code := os.system('$vexe $v_options -o ${output_dir}${file}.js $path') if v_code != 0 { assert false } // Compilation failed - js_code := os.system('node ${output_dir}${file}.js') if js_code != 0 { assert false } // Running failed } - - os.rmdir_all(output_dir) } fn find_test_files() []string {