From f8d66fdaddecc14466671b85338273ebb40af6bf Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 19 May 2026 15:09:11 -0700 Subject: [PATCH 1/3] Extract tscInput tests to individual per-scenario files with imperative edits to improve debuggability --- internal/execute/tsctests/extract.go | 349 ++++++++++++++++++ internal/execute/tsctests/runner.go | 204 ++++++---- internal/execute/tsctests/spec.go | 98 +++++ ...ports_syntax_errors_in_config_file_test.go | 84 +++++ ...ch_demo_updates_with_bad_reference_test.go | 120 ++++++ ...mo_updates_with_circular_reference_test.go | 121 ++++++ ...ldWatch_extends_configDir_template_test.go | 68 ++++ ...atch_libraryResolution_with_config_test.go | 73 ++++ ...on_with_config_with_libReplacement_test.go | 120 ++++++ ...hanges_to_package_json_main_fields_test.go | 74 ++++ ...fferent_module_resolution_settings_test.go | 58 +++ ...rectly_with_cts_and_mts_extensions_test.go | 106 ++++++ ...dWatch_noEmitOnError_noEmitOnError_test.go | 133 +++++++ ...ror_noEmitOnError_with_declaration_test.go | 133 +++++++ ..._with_declaration_with_incremental_test.go | 133 +++++++ ...ror_noEmitOnError_with_incremental_test.go | 133 +++++++ ...watching_when_no_files_are_emitted_test.go | 44 +++ ...files_are_emitted_with_incremental_test.go | 44 +++ ...est_tsbuildWatch_noEmit_dts_errors_test.go | 91 +++++ ...errors_with_incremental_as_modules_test.go | 92 +++++ ...noEmit_dts_errors_with_incremental_test.go | 91 +++++ ...mit_dts_errors_without_dts_enabled_test.go | 91 +++++ ...nabled_with_incremental_as_modules_test.go | 92 +++++ ...thout_dts_enabled_with_incremental_test.go | 91 +++++ ...sbuildWatch_noEmit_semantic_errors_test.go | 91 +++++ ...errors_with_incremental_as_modules_test.go | 92 +++++ ...t_semantic_errors_with_incremental_test.go | 91 +++++ ..._tsbuildWatch_noEmit_syntax_errors_test.go | 91 +++++ ...errors_with_incremental_as_modules_test.go | 92 +++++ ...mit_syntax_errors_with_incremental_test.go | 91 +++++ ...or_when_file_with_no_error_changes_test.go | 49 +++ ...rrors_only_changed_file_is_emitted_test.go | 52 +++ ...rs_when_file_with_no_error_changes_test.go | 39 ++ ..._error_files_all_files_are_emitted_test.go | 42 +++ ...ogramUpdates_tsbuildinfo_has_error_test.go | 25 ++ ...n_stream_project_and_then_fixes_it_test.go | 77 ++++ ...ct_with_extended_config_is_removed_test.go | 74 ++++ ...oUnusedParameters_changes_to_false_test.go | 39 ++ ...s_works_with_extended_source_files_test.go | 135 +++++++ ...here_are_23_projects_in_a_solution_test.go | 187 ++++++++++ ...ects_in_a_solution_with_builders_3_test.go | 187 ++++++++++ ...there_are_3_projects_in_a_solution_test.go | 67 ++++ ...ects_in_a_solution_with_builders_1_test.go | 67 ++++ ...there_are_5_projects_in_a_solution_test.go | 79 ++++ ...ects_in_a_solution_with_builders_2_test.go | 79 ++++ ...there_are_8_projects_in_a_solution_test.go | 97 +++++ ...ects_in_a_solution_with_builders_3_test.go | 97 +++++ ..._reexport_Reports_errors_correctly_test.go | 73 ++++ ...renced_project_and_shared_is_first_test.go | 89 +++++ ...ot_file_is_from_referenced_project_test.go | 89 +++++ ...s_added_and_its_subsequent_updates_test.go | 87 +++++ ...t_updates_with_circular_references_test.go | 88 +++++ ...s_and_reports_found_errors_message_test.go | 102 +++++ ...s_message_with_circular_references_test.go | 103 ++++++ ...ncremental_updates_in_verbose_mode_test.go | 98 +++++ ...tart_build_of_referencing_projects_test.go | 82 ++++ ..._projects_with_circular_references_test.go | 83 +++++ ...en_preserveWatchOutput_is_not_used_test.go | 107 ++++++ ...chOutput_is_passed_on_command_line_test.go | 107 ++++++ ...OnErrors_is_passed_on_command_line_test.go | 108 ++++++ ...ompilation_because_of_program_emit_test.go | 87 +++++ ...program_emit_with_outDir_specified_test.go | 85 +++++ ...have_errors_with_stopBuildOnErrors_test.go | 81 ++++ ..._when_test_does_not_reference_core_test.go | 80 ++++ ..._config_files_that_are_not_present_test.go | 78 ++++ ...file_name_and_output_name_clashing_test.go | 27 ++ ...st_tsbuild_clean_tsx_with_dts_emit_test.go | 36 ++ ...est_tsbuild_commandLine_bad_locale_test.go | 19 + ...uild_commandLine_different_options_test.go | 88 +++++ ...different_options_with_incremental_test.go | 93 +++++ ...clarationOnly_false_on_commandline_test.go | 69 ++++ ...e_with_declaration_and_incremental_test.go | 69 ++++ ...se_on_commandline_with_declaration_test.go | 69 ++++ ...emitDeclarationOnly_on_commandline_test.go | 93 +++++ ...e_with_declaration_and_incremental_test.go | 93 +++++ ...ly_on_commandline_with_declaration_test.go | 93 +++++ .../Test_tsbuild_commandLine_help_test.go | 19 + .../Test_tsbuild_commandLine_locale_test.go | 19 + ...Line_when_build_not_first_argument_test.go | 19 + ...nfigFileErrors_missing_config_file_test.go | 19 + ...ports_syntax_errors_in_config_file_test.go | 73 ++++ ..._tsconfig_extends_the_missing_file_test.go | 42 +++ ...Emit_reports_dts_generation_errors_test.go | 51 +++ ...generation_errors_with_incremental_test.go | 51 +++ ...riple_slash_but_uses_no_references_test.go | 69 ++++ ...is_referenced_through_triple_slash_test.go | 69 ++++ ...erred_type_from_referenced_project_test.go | 49 +++ ..._in_rootDir_at_the_import_location_test.go | 104 ++++++ ...e_error_about_it_by_stopping_build_test.go | 108 ++++++ ...n_circular_is_set_in_the_reference_test.go | 136 +++++++ ...tup_correctly_and_reports_no_error_test.go | 107 ++++++ ...DeclarationOnly_and_declarationMap_test.go | 67 ++++ ...t_project_with_emitDeclarationOnly_test.go | 67 ++++ ...s_project_with_emitDeclarationOnly_test.go | 77 ++++ ...tsbuild_extends_configDir_template_test.go | 54 +++ ..._extends_resolves_the_symlink_path_test.go | 38 ++ ...nd_both_extend_config_with_include_test.go | 54 +++ ...ojects_extends_config_with_include_test.go | 54 +++ ...ete_deleted_file_without_composite_test.go | 39 ++ ...ld_fileDelete_detects_deleted_file_test.go | 48 +++ ...rences_another_project_in_monorepo_test.go | 137 +++++++ ...ferred_type_from_transitive_module_test.go | 92 +++++ ...sitive_module_with_isolatedModules_test.go | 92 +++++ ..._in_signature_with_isolatedModules_test.go | 116 ++++++ ..._projects_and_emits_them_correctly_test.go | 114 ++++++ ...son_files_and_emits_them_correctly_test.go | 89 +++++ ...ged_and_contains_late_bound_member_test.go | 77 ++++ ...uild_libraryResolution_with_config_test.go | 73 ++++ ...on_with_config_with_libReplacement_test.go | 120 ++++++ ...s_between_projects_for_shared_file_test.go | 48 +++ ...on_from_d_ts_of_referenced_project_test.go | 64 ++++ ..._from_referenced_project_correctly_test.go | 50 +++ ...ct_correctly_with_preserveSymlinks_test.go | 50 +++ ...resolution_should_not_report_error_test.go | 61 +++ ...olution_options_referenced_project_test.go | 39 ++ ...tion_when_resolution_is_not_shared_test.go | 66 ++++ ..._across_projects_resolve_correctly_test.go | 89 +++++ ...odule_specifiers_resolve_correctly_test.go | 113 ++++++ .../Test_tsbuild_noCheck_dts_errors_test.go | 122 ++++++ ...oCheck_dts_errors_with_incremental_test.go | 122 ++++++ ...st_tsbuild_noCheck_semantic_errors_test.go | 122 ++++++ ...k_semantic_errors_with_incremental_test.go | 122 ++++++ ...Test_tsbuild_noCheck_syntax_errors_test.go | 122 ++++++ ...eck_syntax_errors_with_incremental_test.go | 122 ++++++ ...t_tsbuild_noEmitOnError_dts_errors_test.go | 53 +++ ...nError_dts_errors_with_declaration_test.go | 53 +++ ..._with_declaration_with_incremental_test.go | 53 +++ ...nError_dts_errors_with_incremental_test.go | 53 +++ ...uild_noEmitOnError_semantic_errors_test.go | 53 +++ ...r_semantic_errors_with_declaration_test.go | 53 +++ ..._with_declaration_with_incremental_test.go | 53 +++ ...r_semantic_errors_with_incremental_test.go | 53 +++ ...sbuild_noEmitOnError_syntax_errors_test.go | 57 +++ ...ror_syntax_errors_with_declaration_test.go | 57 +++ ..._with_declaration_with_incremental_test.go | 57 +++ ...ror_syntax_errors_with_incremental_test.go | 57 +++ ...t_tsbuild_noEmit_changes_composite_test.go | 147 ++++++++ ...it_changes_incremental_declaration_test.go | 147 ++++++++ ...tsbuild_noEmit_changes_incremental_test.go | 147 ++++++++ ...nges_with_initial_noEmit_composite_test.go | 68 ++++ ...ial_noEmit_incremental_declaration_test.go | 68 ++++ ...es_with_initial_noEmit_incremental_test.go | 68 ++++ .../Test_tsbuild_noEmit_dts_errors_test.go | 69 ++++ ...rs_with_declaration_enable_changes_test.go | 68 ++++ ...hanges_with_incremental_as_modules_test.go | 69 ++++ ...on_enable_changes_with_incremental_test.go | 68 ++++ ...enable_changes_with_multiple_files_test.go | 79 ++++ ...errors_with_incremental_as_modules_test.go | 70 ++++ ...noEmit_dts_errors_with_incremental_test.go | 69 ++++ ...mit_dts_errors_without_dts_enabled_test.go | 69 ++++ ...nabled_with_incremental_as_modules_test.go | 70 ++++ ...thout_dts_enabled_with_incremental_test.go | 69 ++++ ...est_tsbuild_noEmit_semantic_errors_test.go | 69 ++++ ...errors_with_incremental_as_modules_test.go | 70 ++++ ...t_semantic_errors_with_incremental_test.go | 69 ++++ .../Test_tsbuild_noEmit_syntax_errors_test.go | 69 ++++ ...errors_with_incremental_as_modules_test.go | 70 ++++ ...mit_syntax_errors_with_incremental_test.go | 69 ++++ ..._is_not_specified_and_is_composite_test.go | 37 ++ ...aths_when_rootDir_is_not_specified_test.go | 36 ++ ...belong_to_rootDir_and_is_composite_test.go | 39 ++ ...ut_not_all_files_belong_to_rootDir_test.go | 38 ++ ...putPaths_when_rootDir_is_specified_test.go | 37 ++ ...t_is_source_from_project_reference_test.go | 40 ++ ...m_project_reference_with_composite_test.go | 43 +++ ...e_belongs_to_multiple_sub_projects_test.go | 85 +++++ ...thRootDirInParent_builds_correctly_test.go | 47 +++ ...ile_because_no_rootDir_in_the_base_test.go | 47 +++ ...ts_error_for_same_tsbuildinfo_file_test.go | 49 +++ ...buildinfo_file_without_incremental_test.go | 45 +++ ..._file_without_incremental_with_tsc_test.go | 50 +++ ...s_no_error_when_tsbuildinfo_differ_test.go | 49 +++ ...here_are_23_projects_in_a_solution_test.go | 187 ++++++++++ ...ects_in_a_solution_with_builders_3_test.go | 187 ++++++++++ ...there_are_3_projects_in_a_solution_test.go | 67 ++++ ...ects_in_a_solution_with_builders_1_test.go | 67 ++++ ...there_are_5_projects_in_a_solution_test.go | 79 ++++ ...ects_in_a_solution_with_builders_2_test.go | 79 ++++ ...there_are_8_projects_in_a_solution_test.go | 97 +++++ ...ects_in_a_solution_with_builders_3_test.go | 97 +++++ ...containing_json_file_non_composite_test.go | 40 ++ ...nModule_files_containing_json_file_test.go | 40 ++ ...json_module_from_project_reference_test.go | 61 +++ ...le_include_and_files_non_composite_test.go | 40 ++ ...esolveJsonModule_include_and_files_test.go | 40 ++ ...name_matches_ts_file_non_composite_test.go | 40 ++ ...lude_and_file_name_matches_ts_file_test.go | 40 ++ ...g_with_other_include_non_composite_test.go | 40 ++ ...e_of_json_along_with_other_include_test.go | 40 ++ ...nModule_include_only_non_composite_test.go | 40 ++ ...ild_resolveJsonModule_include_only_test.go | 40 ++ ..._json_not_in_rootDir_non_composite_test.go | 40 ++ ...lude_only_with_json_not_in_rootDir_test.go | 40 ++ ...side_configDirectory_non_composite_test.go | 40 ++ ...ootDir_but_outside_configDirectory_test.go | 40 ++ ..._only_without_outDir_non_composite_test.go | 40 ++ ...Module_include_only_without_outDir_test.go | 40 ++ ...JsonModule_sourcemap_non_composite_test.go | 44 +++ ...sbuild_resolveJsonModule_sourcemap_test.go | 44 +++ ...odule_without_outDir_non_composite_test.go | 44 +++ ...d_resolveJsonModule_without_outDir_test.go | 44 +++ ...tive_and_non_consecutive_are_mixed_test.go | 47 +++ ...ots_when_files_are_not_consecutive_test.go | 38 ++ ...ultiple_root_files_are_consecutive_test.go | 38 ++ ...renced_project_and_shared_is_first_test.go | 89 +++++ ...ot_file_is_from_referenced_project_test.go | 89 +++++ ...hen_two_root_files_are_consecutive_test.go | 36 ++ ...ays_builds_under_with_force_option_test.go | 76 ++++ ...not_build_order_doesnt_throw_error_test.go | 72 ++++ ...y_when_declarationDir_is_specified_test.go | 72 ++++ ...correctly_when_outDir_is_specified_test.go | 72 ++++ ...site_or_doesnt_have_any_references_test.go | 72 ++++ ...n_if_upstream_projects_have_errors_test.go | 76 ++++ ...an_detect_when_and_what_to_rebuild_test.go | 110 ++++++ ...not_build_order_doesnt_throw_error_test.go | 72 ++++ ...not_write_any_files_in_a_dry_build_test.go | 72 ++++ .../Test_tsbuild_sample_explainFiles_test.go | 97 +++++ ...uld_skip_builds_during_a_dry_build_test.go | 77 ++++ ...st_tsbuild_sample_listEmittedFiles_test.go | 97 +++++ .../Test_tsbuild_sample_listFiles_test.go | 97 +++++ ...sbuildinfo_doesnt_match_ts_version_test.go | 81 ++++ ..._from_start_if_force_option_is_set_test.go | 77 ++++ ..._when_extended_config_file_changes_test.go | 86 +++++ ..._sample_removes_all_files_it_built_test.go | 82 ++++ ...rts_error_if_input_file_is_missing_test.go | 67 ++++ ...f_input_file_is_missing_with_force_test.go | 67 ++++ .../tests/Test_tsbuild_sample_sample_test.go | 119 ++++++ ...have_errors_with_stopBuildOnErrors_test.go | 85 +++++ ..._when_test_does_not_reference_core_test.go | 84 +++++ ...build_sample_tsbuildinfo_has_error_test.go | 31 ++ ...sample_when_declarationMap_changes_test.go | 100 +++++ ...le_when_declaration_option_changes_test.go | 82 ++++ ...hen_esModuleInterop_option_changes_test.go | 92 +++++ ...ange_but_its_modified_time_changes_test.go | 81 ++++ ...en_logic_specifies_tsBuildInfoFile_test.go | 73 ++++ ..._sample_when_module_option_changes_test.go | 82 ++++ ..._sample_when_target_option_changes_test.go | 90 +++++ ..._empty_and_references_are_provided_test.go | 43 +++ ...pty_and_no_references_are_provided_test.go | 32 ++ ...nitial_build_doesnt_build_anything_test.go | 70 ++++ ..._solution_is_referenced_indirectly_test.go | 51 +++ ...nsitiveReferences_builds_correctly_test.go | 56 +++ ...solution_with_external_module_name_test.go | 54 +++ ...s_at_types_package_installed_later_test.go | 32 ++ ...h_detects_change_in_symlinked_file_test.go | 33 ++ ..._new_subdirectories_simultaneously_test.go | 34 ++ ...e_added_in_new_nested_subdirectory_test.go | 33 ++ ...eviously_non_existent_include_path_test.go | 33 ++ ..._and_new_file_added_simultaneously_test.go | 33 ++ ...ects_file_renamed_and_renamed_back_test.go | 41 ++ ...h_detects_import_path_restructured_test.go | 33 ++ ...detects_imported_directory_removed_test.go | 32 ++ ...ported_file_added_in_new_directory_test.go | 30 ++ ...ule_going_missing_then_coming_back_test.go | 39 ++ ...subdirectory_removed_and_recreated_test.go | 41 ++ ...file_in_existing_include_directory_test.go | 33 ++ ...s_new_file_resolving_failed_import_test.go | 30 ++ ...detects_node_modules_package_added_test.go | 32 ++ ...tects_node_modules_package_removed_test.go | 35 ++ ...ts_package_json_types_field_edited_test.go | 33 ++ ...h_detects_scoped_package_installed_test.go | 31 ++ ...tch_handles_file_rapidly_recreated_test.go | 31 ++ ...tch_watch_handles_tsconfig_deleted_test.go | 31 ++ ...sconfig_with_extends_base_modified_test.go | 37 ++ ...tch_rebuilds_when_file_is_modified_test.go | 30 ++ ...builds_when_source_file_is_deleted_test.go | 32 ++ ...tsconfig_include_pattern_adds_file_test.go | 37 ++ ...onfig_is_modified_to_change_strict_test.go | 30 ++ ...g_is_touched_but_content_unchanged_test.go | 30 ++ ...h_skips_build_when_no_files_change_test.go | 27 ++ ...ndLineWatch_watch_with_no_tsconfig_test.go | 22 ++ ...atch_with_tsconfig_and_incremental_test.go | 23 ++ ..._tsconfig_files_list_entry_deleted_test.go | 34 ++ ...ne_Initialized_TSConfig_with_watch_test.go | 19 + ...ndLine_Parse_watch_interval_option_test.go | 28 ++ ...erval_option_without_tsconfig_json_test.go | 19 + .../Test_tscWatch_noEmit_dts_errors_test.go | 88 +++++ ...mit_dts_errors_without_dts_enabled_test.go | 87 +++++ ...st_tscWatch_noEmit_semantic_errors_test.go | 87 +++++ ...Test_tscWatch_noEmit_syntax_errors_test.go | 87 +++++ ...e_and_refers_to_config_with_noEmit_test.go | 39 ++ ...zed_TSConfig_with_advanced_options_test.go | 19 + ...ith_boolean_value_compiler_options_test.go | 19 + ...g_with_enum_value_compiler_options_test.go | 19 + ...alized_TSConfig_with_files_options_test.go | 19 + ...ine_Initialized_TSConfig_with_help_test.go | 19 + ...fig_with_incorrect_compiler_option_test.go | 19 + ...th_incorrect_compiler_option_value_test.go | 19 + ...SConfig_with_list_compiler_options_test.go | 19 + ...t_compiler_options_with_enum_value_test.go | 19 + ...alized_TSConfig_with_tsconfig_json_test.go | 28 ++ ...ommandLine_Parse_enum_type_options_test.go | 19 + ...ne_Parse_lib_option_with_file_name_test.go | 22 ++ .../Test_tsc_commandLine_Parse_p_test.go | 28 ++ ...Parse_p_with_path_to_tsconfig_file_test.go | 28 ++ ...rse_p_with_path_to_tsconfig_folder_test.go | 28 ++ ...ommandLine_Project_is_empty_string_test.go | 28 ++ ...adds_color_when_FORCE_COLOR_is_set_test.go | 21 ++ .../Test_tsc_commandLine_bad_locale_test.go | 19 + ..._is_set_even_if_FORCE_COLOR_is_set_test.go | 22 ++ ...not_add_color_when_NO_COLOR_is_set_test.go | 21 ++ .../Test_tsc_commandLine_help_all_test.go | 19 + .../tests/Test_tsc_commandLine_help_test.go | 19 + .../tests/Test_tsc_commandLine_locale_test.go | 19 + ..._DiagnosticsPresent_OutputsSkipped_test.go | 21 ++ ...host_cannot_provide_terminal_width_test.go | 18 + ...sc_composite_converting_to_modules_test.go | 39 ++ ...om_CJS_module_error_on_jsx_element_test.go | 37 ++ ...CJS_module_no_crash_no_jsx_element_test.go | 37 ++ ...ine_but_has_tsbuild_info_in_config_test.go | 33 ++ ...ine_but_has_tsbuild_info_in_config_test.go | 33 ++ ...ng_composite_false_on_command_line_test.go | 32 ++ ...ing_composite_null_on_command_line_test.go | 32 ++ ...Emit_reports_dts_generation_errors_test.go | 56 +++ ...generation_errors_with_incremental_test.go | 56 +++ ...ype_alias_across_a_module_boundary_test.go | 69 ++++ ...g_package_through_indirect_symlink_test.go | 67 ++++ ...urce_and_another_symlinked_package_test.go | 91 +++++ ...mlinked_package_with_indirect_link_test.go | 97 +++++ ...indows_paths_and_uppercase_letters_test.go | 60 +++ ...ends_configDir_template_showConfig_test.go | 54 +++ ...est_tsc_extends_configDir_template_test.go | 54 +++ ...onfigDir_template_with_commandline_test.go | 54 +++ ..._extends_resolves_the_symlink_path_test.go | 38 ++ ...n_disk_that_differs_only_in_casing_test.go | 26 ++ ...tiple_places_with_different_casing_test.go | 37 ++ ..._and_non_relative_file_resolutions_test.go | 28 ++ ...es_with_triple_slash_ref_from_file_test.go | 24 ++ ...nFileNames_with_type_ref_from_file_test.go | 27 ++ ...generateTrace_generates_types_file_test.go | 32 ++ ...h_multiple_files_and_complex_types_test.go | 35 ++ ...oreConfig_mixing_project_and_files_test.go | 27 ++ ..._and_files_when_config_file_absent_test.go | 24 ++ ...nfig_file_absent_with_ignoreConfig_test.go | 24 ++ ...roject_and_files_with_ignoreConfig_test.go | 27 ++ ..._tsc_ignoreConfig_specifying_files_test.go | 27 ++ ...ying_files_when_config_file_absent_test.go | 24 ++ ...nfig_file_absent_with_ignoreConfig_test.go | 24 ++ ...specifying_files_with_ignoreConfig_test.go | 27 ++ ...sc_ignoreConfig_specifying_project_test.go | 27 ++ ...ng_project_when_config_file_absent_test.go | 24 ++ ...nfig_file_absent_with_ignoreConfig_test.go | 24 ++ ...ecifying_project_with_ignoreConfig_test.go | 27 ++ ...c_ignoreConfig_without_any_options_test.go | 26 ++ ...ny_options_when_config_file_absent_test.go | 23 ++ ...nfig_file_absent_with_ignoreConfig_test.go | 24 ++ ...hout_any_options_with_ignoreConfig_test.go | 27 ++ ...l_with_case_insensitive_file_names_test.go | 52 +++ ...modifier_of_class_expression_field_test.go | 102 +++++ ...ield_with_declaration_emit_enabled_test.go | 103 ++++++ ...bal_through_export_in_another_file_test.go | 36 ++ ...other_file_through_indirect_import_test.go | 37 ++ ...st_enums_aliased_in_different_file_test.go | 62 ++++ ...sc_incremental_const_enums_aliased_test.go | 73 ++++ .../Test_tsc_incremental_const_enums_test.go | 68 ++++ ...remental_const_enums_with_refCycle_test.go | 56 +++ ...ental_generates_typerefs_correctly_test.go | 76 ++++ ...internal_symbolname_in_tsbuildInfo_test.go | 121 ++++++ ...port_in_jsdoc_in_composite_project_test.go | 44 +++ ...ntal_option_changes_with_composite_test.go | 103 ++++++ ...al_option_changes_with_incremental_test.go | 92 +++++ ...o_backing_types_found_doesnt_crash_test.go | 41 ++ ...es_found_doesnt_crash_under_strict_test.go | 42 +++ ...ntal_serializing_composite_project_test.go | 29 ++ ...ncremental_serializing_error_chain_test.go | 45 +++ ..._incremental_tsbuildinfo_has_error_test.go | 31 ++ ...c_incremental_when_file_is_deleted_test.go | 35 ++ ...s_added_the_signatures_are_updated_test.go | 82 ++++ ...ename_for_buildinfo_on_commandline_test.go | 35 ++ ...n_passing_rootDir_from_commandline_test.go | 32 ++ ...passing_rootDir_is_in_the_tsconfig_test.go | 32 ++ ..._is_bind_diagnostics_thats_ignored_test.go | 42 +++ ...sc_incremental_with_only_dts_files_test.go | 35 ++ ..._tsc_libraryResolution_unknown_lib_test.go | 38 ++ ...braryResolution_when_noLib_toggles_test.go | 34 ++ ..._tsc_libraryResolution_with_config_test.go | 73 ++++ ...on_with_config_with_libReplacement_test.go | 120 ++++++ ...ilesOnly_combined_with_incremental_test.go | 37 ++ .../Test_tsc_listFilesOnly_loose_file_test.go | 22 ++ ...c_moduleResolution_alternateResult_test.go | 250 +++++++++++++ ...oduleResolution_package_json_scope_test.go | 49 +++ ...moduleResolution_pnpm_style_layout_test.go | 117 ++++++ .../tests/Test_tsc_noCheck_dts_errors_test.go | 122 ++++++ ...oCheck_dts_errors_with_incremental_test.go | 122 ++++++ .../Test_tsc_noCheck_semantic_errors_test.go | 122 ++++++ ...k_semantic_errors_with_incremental_test.go | 122 ++++++ .../Test_tsc_noCheck_syntax_errors_test.go | 122 ++++++ ...eck_syntax_errors_with_incremental_test.go | 122 ++++++ .../Test_tsc_noEmitOnError_dts_errors_test.go | 53 +++ ...nError_dts_errors_with_declaration_test.go | 53 +++ ..._with_declaration_with_incremental_test.go | 53 +++ ...nError_dts_errors_with_incremental_test.go | 53 +++ ...re_fixing_error_with_noEmitOnError_test.go | 36 ++ ..._tsc_noEmitOnError_semantic_errors_test.go | 53 +++ ...r_semantic_errors_with_declaration_test.go | 53 +++ ..._with_declaration_with_incremental_test.go | 53 +++ ...r_semantic_errors_with_incremental_test.go | 53 +++ ...st_tsc_noEmitOnError_syntax_errors_test.go | 57 +++ ...ror_syntax_errors_with_declaration_test.go | 57 +++ ..._with_declaration_with_incremental_test.go | 57 +++ ...ror_syntax_errors_with_incremental_test.go | 57 +++ ...nError_when_declarationMap_changes_test.go | 45 +++ .../Test_tsc_noEmit_changes_composite_test.go | 147 ++++++++ ...it_changes_incremental_declaration_test.go | 147 ++++++++ ...est_tsc_noEmit_changes_incremental_test.go | 147 ++++++++ ...nges_with_initial_noEmit_composite_test.go | 68 ++++ ...ial_noEmit_incremental_declaration_test.go | 68 ++++ ...es_with_initial_noEmit_incremental_test.go | 68 ++++ .../tests/Test_tsc_noEmit_dts_errors_test.go | 69 ++++ ...enable_changes_with_multiple_files_test.go | 79 ++++ ...errors_with_incremental_as_modules_test.go | 70 ++++ ...noEmit_dts_errors_with_incremental_test.go | 69 ++++ ...mit_dts_errors_without_dts_enabled_test.go | 69 ++++ ...nabled_with_incremental_as_modules_test.go | 70 ++++ ...thout_dts_enabled_with_incremental_test.go | 69 ++++ .../Test_tsc_noEmit_semantic_errors_test.go | 69 ++++ ...errors_with_incremental_as_modules_test.go | 70 ++++ ...t_semantic_errors_with_incremental_test.go | 69 ++++ .../Test_tsc_noEmit_syntax_errors_test.go | 69 ++++ ...errors_with_incremental_as_modules_test.go | 70 ++++ ...mit_syntax_errors_with_incremental_test.go | 69 ++++ ...oEmit_when_project_has_strict_true_test.go | 32 ++ ...p_uses_referenced_project_settings_test.go | 61 +++ ...efault_setup_was_created_correctly_test.go | 38 ++ ...mposite_if_its_a_container_project_test.go | 39 ++ ...nfer_the_rootDir_from_source_paths_test.go | 29 ++ ...when_a_file_is_outside_the_rootdir_test.go | 30 ++ ...nces_errors_when_declaration_false_test.go | 29 ++ ...en_the_file_list_is_not_exhaustive_test.go | 30 ++ ...he_referenced_project_doesnt_exist_test.go | 31 ++ ...nced_project_doesnt_have_composite_test.go | 37 ++ ...onstEnums_and_verbatimModuleSyntax_test.go | 54 +++ ...ror_when_the_input_file_is_missing_test.go | 37 ++ ...n_module_reference_is_not_relative_test.go | 39 ++ ...s_redirects_to_the_output_dts_file_test.go | 37 ++ ...isallows_synthetic_default_imports_test.go | 47 +++ ...ed_project_with_preserveConstEnums_test.go | 40 ++ ...ImportExtensionsProjectReferences1_test.go | 58 +++ ...ImportExtensionsProjectReferences2_test.go | 45 +++ ...ImportExtensionsProjectReferences3_test.go | 49 +++ ...contains_invalid_project_reference_test.go | 28 ++ ...hen_project_reference_is_not_built_test.go | 34 ++ ...nces_composite_project_with_noEmit_test.go | 35 ++ ..._when_project_references_composite_test.go | 35 ++ ...onfig_Default_initialized_TSConfig_test.go | 19 + ...how_TSConfig_with_advanced_options_test.go | 19 + ...ith_boolean_value_compiler_options_test.go | 19 + ...Config_with_compileOnSave_and_more_test.go | 41 ++ ...g_with_enum_value_compiler_options_test.go | 19 + ...w_TSConfig_with_exclude_and_outDir_test.go | 32 ++ ...wConfig_Show_TSConfig_with_exclude_test.go | 31 ++ ...ow_TSConfig_with_files_and_include_test.go | 34 ++ ...g_Show_TSConfig_with_files_options_test.go | 19 + ...onfig_with_include_filtering_files_test.go | 32 ++ ...fig_with_incorrect_compiler_option_test.go | 19 + ...th_incorrect_compiler_option_value_test.go | 19 + ...SConfig_with_list_compiler_options_test.go | 19 + ...t_compiler_options_with_enum_value_test.go | 19 + ..._Show_TSConfig_with_paths_and_more_test.go | 49 +++ ...nfig_Show_TSConfig_with_references_test.go | 32 ++ ..._with_transitively_implied_options_test.go | 27 ++ ...arse_tsconfig_with_typeAcquisition_test.go | 33 ++ 462 files changed, 28580 insertions(+), 64 deletions(-) create mode 100644 internal/execute/tsctests/extract.go create mode 100644 internal/execute/tsctests/spec.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_bad_reference_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_circular_reference_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_extends_configDir_template_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_with_extended_source_files_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_reexport_Reports_errors_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_clean_file_name_and_output_name_clashing_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_clean_tsx_with_dts_emit_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_bad_locale_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_help_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_locale_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_commandLine_when_build_not_first_argument_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_missing_config_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_is_set_in_the_reference_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_extends_configDir_template_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_extends_resolves_the_symlink_path_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_fileDelete_deleted_file_without_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_fileDelete_detects_deleted_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_with_libReplacement_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_when_resolution_is_not_shared_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_non_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_roots_when_files_are_not_consecutive_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_roots_when_multiple_root_files_are_consecutive_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_roots_when_two_root_files_are_consecutive_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_always_builds_under_with_force_option_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_explainFiles_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_listEmittedFiles_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_listFiles_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_removes_all_files_it_built_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_sample_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_tsbuildinfo_has_error_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_when_declarationMap_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_when_declaration_option_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_when_esModuleInterop_option_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_when_module_option_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_sample_when_target_option_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_solution_when_solution_is_referenced_indirectly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_builds_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_without_dts_enabled_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_noEmit_semantic_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tscWatch_noEmit_syntax_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_files_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_help_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_enum_type_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_lib_option_with_file_name_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_Project_is_empty_string_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_bad_locale_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_help_all_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_help_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_locale_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_composite_converting_to_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_null_on_command_line_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_showConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_with_commandline_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_extends_resolves_the_symlink_path_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_generates_types_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_in_different_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_with_refCycle_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_generates_typerefs_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_serializing_composite_project_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_serializing_error_chain_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_tsbuildinfo_has_error_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_when_file_is_deleted_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_from_commandline_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_incremental_with_only_dts_files_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_libraryResolution_unknown_lib_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_libraryResolution_when_noLib_toggles_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_with_libReplacement_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_listFilesOnly_combined_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_listFilesOnly_loose_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_moduleResolution_alternateResult_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_moduleResolution_package_json_scope_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_moduleResolution_pnpm_style_layout_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmitOnError_when_declarationMap_changes_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_changes_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_noEmit_when_project_has_strict_true_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_default_setup_was_created_correctly_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_declaration_false_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_redirects_to_the_output_dts_file_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_contains_invalid_project_reference_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_reference_is_not_built_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Default_initialized_TSConfig_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_advanced_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_and_include_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_references_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go create mode 100644 internal/execute/tsctests/tests/Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go diff --git a/internal/execute/tsctests/extract.go b/internal/execute/tsctests/extract.go new file mode 100644 index 00000000000..f4b3c0e435f --- /dev/null +++ b/internal/execute/tsctests/extract.go @@ -0,0 +1,349 @@ +package tsctests + +import ( + "crypto/sha1" + "encoding/hex" + "fmt" + "go/format" + "io/fs" + "maps" + "os" + "path/filepath" + "regexp" + "slices" + "strconv" + "strings" + "sync" + "testing/fstest" + "time" + + "github.com/microsoft/typescript-go/internal/repo" +) + +// capturedFsEntry is a comparable snapshot of a single entry on the test file +// system. Exactly one of content or symlink is non-empty. mtime is included +// so that "touch without content change" edits can be detected. +type capturedFsEntry struct { + content string + symlink string + mtime time.Time +} + +// capturedEditOp describes one observed effect of running a tscEdit's edit +// function, used to generate equivalent calls in the extracted test file. +type capturedEditOp struct { + op string // "write", "remove", "symlink" + path string + content string // for "write" (file content) or "symlink" (target path) +} + +// captureFsSnapshot returns a comparable map of the current user-visible +// state of the test file system, excluding files that were auto-injected as +// default library files. +func captureFsSnapshot(sys *TestSys) map[string]capturedFsEntry { + snap := map[string]capturedFsEntry{} + libs := sys.fs.defaultLibs + m := sys.mapFs() + for path, file := range m.Entries() { + if libs != nil && libs.Has(path) { + continue + } + if file.Mode&fs.ModeSymlink != 0 { + target, _ := m.GetTargetOfSymlink(path) + snap[path] = capturedFsEntry{symlink: target, mtime: file.ModTime} + } else if file.Mode.IsRegular() { + snap[path] = capturedFsEntry{content: string(file.Data), mtime: file.ModTime} + } + } + return snap +} + +// diffFsSnapshots reports the operations needed to transform before into +// after. Removals come first, then writes (sorted by path), so the generated +// code is deterministic. +func diffFsSnapshots(before, after map[string]capturedFsEntry) []capturedEditOp { + var ops []capturedEditOp + removed := make([]string, 0) + for path := range before { + if _, ok := after[path]; !ok { + removed = append(removed, path) + } + } + slices.Sort(removed) + for _, p := range removed { + ops = append(ops, capturedEditOp{op: "remove", path: p}) + } + changed := make([]string, 0) + for path, ae := range after { + if be, ok := before[path]; !ok || be != ae { + changed = append(changed, path) + } + } + slices.Sort(changed) + for _, p := range changed { + e := after[p] + if e.symlink != "" { + ops = append(ops, capturedEditOp{op: "symlink", path: p, content: e.symlink}) + } else { + ops = append(ops, capturedEditOp{op: "write", path: p, content: e.content}) + } + } + return ops +} + +// writeTestSourceFile emits a standalone _test.go file under +// internal/execute/tsctests/tests/ that, when executed, reproduces the given +// test scenario by constructing an equivalent [TestSpec] and invoking Run on +// it. Edit functions are reconstructed from the observed file system effects +// captured during the original run. +func (test *tscInput) writeTestSourceFile(scenario string, editOps [][]capturedEditOp) { + funcName := makeTestFuncName(test.getBaselineSubFolder(), scenario, test.subScenario) + source := test.renderTestSource(scenario, funcName, editOps) + if formatted, err := format.Source([]byte(source)); err == nil { + source = string(formatted) + } + + outDir := filepath.Join(repo.RootPath(), "internal", "execute", "tsctests", "tests") + if err := os.MkdirAll(outDir, 0o755); err != nil { + panic(fmt.Errorf("tsctests: failed to create %s: %w", outDir, err)) + } + outPath := filepath.Join(outDir, funcName+"_test.go") + if existing, err := os.ReadFile(outPath); err == nil && string(existing) == source { + return + } + if err := os.WriteFile(outPath, []byte(source), 0o644); err != nil { + panic(fmt.Errorf("tsctests: failed to write %s: %w", outPath, err)) + } +} + +func (test *tscInput) renderTestSource(scenario string, funcName string, editOps [][]capturedEditOp) string { + needsVfstest := fileMapNeedsVfstest(test.files) || editOpsNeedVfstest(editOps) + + var b strings.Builder + b.WriteString("// Code generated by tsctests; DO NOT EDIT.\n") + b.WriteString("\n") + b.WriteString("package tests\n") + b.WriteString("\n") + b.WriteString("import (\n") + b.WriteString("\t\"testing\"\n") + b.WriteString("\n") + b.WriteString("\t\"github.com/microsoft/typescript-go/internal/execute/tsctests\"\n") + if needsVfstest { + b.WriteString("\t\"github.com/microsoft/typescript-go/internal/vfs/vfstest\"\n") + } + b.WriteString(")\n") + b.WriteString("\n") + + fmt.Fprintf(&b, "func %s(t *testing.T) {\n", funcName) + b.WriteString("\ttest := &tsctests.TestSpec{\n") + fmt.Fprintf(&b, "\t\tScenario: %s,\n", strconv.Quote(scenario)) + fmt.Fprintf(&b, "\t\tSubScenario: %s,\n", strconv.Quote(test.subScenario)) + if test.commandLineArgs != nil { + fmt.Fprintf(&b, "\t\tCommandLineArgs: %s,\n", formatStringSlice(test.commandLineArgs)) + } + if test.cwd != "" { + fmt.Fprintf(&b, "\t\tCwd: %s,\n", strconv.Quote(test.cwd)) + } + if test.ignoreCase { + b.WriteString("\t\tIgnoreCase: true,\n") + } + if test.windowsStyleRoot != "" { + fmt.Fprintf(&b, "\t\tWindowsStyleRoot: %s,\n", strconv.Quote(test.windowsStyleRoot)) + } + if len(test.env) > 0 { + writeEnvField(&b, test.env, "\t\t") + } + if len(test.files) > 0 { + writeFilesField(&b, test.files, "\t\t") + } + b.WriteString("\t}\n") + b.WriteString("\ttest.Start(t)\n") + if len(test.edits) > 0 { + writeEditCalls(&b, test.edits, editOps, "\t") + } + b.WriteString("\ttest.End()\n") + b.WriteString("}\n") + + return b.String() +} + +func fileMapNeedsVfstest(files FileMap) bool { + for _, v := range files { + if mf, ok := v.(*fstest.MapFile); ok && mf.Mode&fs.ModeSymlink != 0 { + return true + } + } + return false +} + +func editOpsNeedVfstest(editOps [][]capturedEditOp) bool { + for _, ops := range editOps { + for _, op := range ops { + if op.op == "symlink" { + return true + } + } + } + return false +} + +func writeEnvField(b *strings.Builder, env map[string]string, indent string) { + fmt.Fprintf(b, "%sEnv: map[string]string{\n", indent) + keys := slices.Sorted(maps.Keys(env)) + for _, k := range keys { + fmt.Fprintf(b, "%s\t%s: %s,\n", indent, strconv.Quote(k), strconv.Quote(env[k])) + } + fmt.Fprintf(b, "%s},\n", indent) +} + +func writeFilesField(b *strings.Builder, files FileMap, indent string) { + fmt.Fprintf(b, "%sFiles: tsctests.FileMap{\n", indent) + keys := slices.Sorted(maps.Keys(files)) + for _, k := range keys { + fmt.Fprintf(b, "%s\t%s: %s,\n", indent, strconv.Quote(k), formatFileMapValue(files[k])) + } + fmt.Fprintf(b, "%s},\n", indent) +} + +func formatFileMapValue(v any) string { + switch tv := v.(type) { + case string: + return formatStringLiteral(tv) + case []byte: + return formatStringLiteral(string(tv)) + case *fstest.MapFile: + if tv.Mode&fs.ModeSymlink != 0 { + target := string(tv.Data) + if !strings.HasPrefix(target, "/") { + target = "/" + target + } + return fmt.Sprintf("vfstest.Symlink(%s)", strconv.Quote(target)) + } + return formatStringLiteral(string(tv.Data)) + default: + return fmt.Sprintf("%q /* unsupported FileMap value type %T */", fmt.Sprintf("%v", v), v) + } +} + +func writeEditCalls(b *strings.Builder, edits []*tscEdit, editOps [][]capturedEditOp, indent string) { + for i, e := range edits { + b.WriteString("\n") + fmt.Fprintf(b, "%stest.Edit(&tsctests.TestEdit{\n", indent) + if e.caption != "" { + fmt.Fprintf(b, "%s\tCaption: %s,\n", indent, strconv.Quote(e.caption)) + } + if e.commandLineArgs != nil { + fmt.Fprintf(b, "%s\tCommandLineArgs: %s,\n", indent, formatStringSlice(e.commandLineArgs)) + } + if e.expectedDiff != "" { + fmt.Fprintf(b, "%s\tExpectedDiff: %s,\n", indent, strconv.Quote(e.expectedDiff)) + } + if i < len(editOps) && len(editOps[i]) > 0 { + fmt.Fprintf(b, "%s\tEdit: func(sys *tsctests.TestSys) {\n", indent) + for _, op := range editOps[i] { + switch op.op { + case "write": + fmt.Fprintf(b, "%s\t\tsys.WriteFile(%s, %s)\n", indent, strconv.Quote(op.path), formatStringLiteral(op.content)) + case "remove": + fmt.Fprintf(b, "%s\t\tsys.Remove(%s)\n", indent, strconv.Quote(op.path)) + case "symlink": + // TestSys does not yet expose a way to create symlinks at + // runtime; record the intent so a human can finish the + // edit by hand if needed. + fmt.Fprintf(b, "%s\t\t_ = vfstest.Symlink(%s) // TODO: create symlink at %s\n", indent, strconv.Quote(op.content), strconv.Quote(op.path)) + } + } + fmt.Fprintf(b, "%s\t},\n", indent) + } + fmt.Fprintf(b, "%s})\n", indent) + } +} + +// formatStringLiteral picks the most readable Go string literal for s. Raw +// string literals are preferred for multi-line content, falling back to +// double-quoted strings when the content contains characters that cannot +// appear in a raw literal (e.g. a backtick). +func formatStringLiteral(s string) string { + if shouldUseRawLiteral(s) { + return "`" + s + "`" + } + return strconv.Quote(s) +} + +func shouldUseRawLiteral(s string) bool { + if strings.ContainsAny(s, "`\r") { + return false + } + if !strings.Contains(s, "\n") { + return false + } + for _, r := range s { + // Raw strings preserve every byte literally, but they must contain + // only valid printable runes plus tab/newline to round-trip cleanly. + if r == '\t' || r == '\n' { + continue + } + if r < 0x20 || r == 0x7f { + return false + } + } + return true +} + +func formatStringSlice(slice []string) string { + parts := make([]string, len(slice)) + for i, s := range slice { + parts[i] = strconv.Quote(s) + } + return "[]string{" + strings.Join(parts, ", ") + "}" +} + +var ( + identSanitizer = regexp.MustCompile(`[^A-Za-z0-9]+`) + + // usedFuncNames tracks generated test function names within this process + // so that two distinct (scenario, subScenario) pairs that sanitize to the + // same identifier do not silently overwrite each other. + usedFuncNames = map[string]struct{}{} + usedFuncNamesMu sync.Mutex +) + +// makeTestFuncName produces a unique, valid Go identifier suitable for use as +// a test function name. It joins the supplied parts with underscores and +// appends a short hash suffix when the sanitized result would be ambiguous. +func makeTestFuncName(parts ...string) string { + var b strings.Builder + b.WriteString("Test") + joinedRaw := strings.Join(parts, "/") + for _, p := range parts { + sanitized := identSanitizer.ReplaceAllString(p, "_") + sanitized = strings.Trim(sanitized, "_") + if sanitized == "" { + continue + } + b.WriteByte('_') + b.WriteString(sanitized) + } + + const maxLen = 160 + name := b.String() + if len(name) > maxLen { + sum := sha1.Sum([]byte(joinedRaw)) + suffix := "_" + hex.EncodeToString(sum[:4]) + name = name[:maxLen-len(suffix)] + suffix + } + + usedFuncNamesMu.Lock() + defer usedFuncNamesMu.Unlock() + if _, taken := usedFuncNames[name]; taken { + sum := sha1.Sum([]byte(joinedRaw)) + suffix := "_" + hex.EncodeToString(sum[:4]) + candidate := name + suffix + if len(candidate) > maxLen { + candidate = name[:maxLen-len(suffix)] + suffix + } + name = candidate + } + usedFuncNames[name] = struct{}{} + return name +} diff --git a/internal/execute/tsctests/runner.go b/internal/execute/tsctests/runner.go index 8adfca02233..7e4de4bcb1e 100644 --- a/internal/execute/tsctests/runner.go +++ b/internal/execute/tsctests/runner.go @@ -38,6 +38,10 @@ type tscInput struct { env map[string]string ignoreCase bool windowsStyleRoot string + // extracted is true when this tscInput was constructed from a [TestSpec] + // (e.g. by a generated test file). When true, run() skips the call to + // writeTestSourceFile to avoid re-emitting the same generated file. + extracted bool } func (test *tscInput) executeCommand(sys *TestSys, baselineBuilder *strings.Builder, commandLineArgs []string) tsc.CommandLineResult { @@ -66,74 +70,146 @@ func (test *tscInput) run(t *testing.T, scenario string) { t.Helper() t.Run(test.getBaselineSubFolder()+"/"+test.subScenario, func(t *testing.T) { t.Parallel() - // initial test tsc compile - baselineBuilder := &strings.Builder{} - sys := newTestSys(test, false) - fmt.Fprint( - baselineBuilder, - "currentDirectory::", - sys.GetCurrentDirectory(), - "\nuseCaseSensitiveFileNames::", - sys.FS().UseCaseSensitiveFileNames(), - "\nInput::\n", - ) - sys.baselineFSwithDiff(baselineBuilder) - result := test.executeCommand(sys, baselineBuilder, test.commandLineArgs) - sys.serializeState(baselineBuilder) - var unexpectedDiff strings.Builder - unexpectedDiff.WriteString(sys.baselinePrograms(baselineBuilder, "Initial build")) - - for index, do := range test.edits { - sys.clearOutput() - wg := core.NewWorkGroup(false) - var nonIncrementalSys *TestSys - commandLineArgs := core.IfElse(do.commandLineArgs == nil, test.commandLineArgs, do.commandLineArgs) - wg.Queue(func() { - baselineBuilder.WriteString(fmt.Sprintf("\n\nEdit [%d]:: %s\n", index, do.caption)) - if do.edit != nil { - do.edit(sys) - } - sys.baselineFSwithDiff(baselineBuilder) - - if result.Watcher == nil { - test.executeCommand(sys, baselineBuilder, commandLineArgs) - } else { - result.Watcher.DoCycle() - } - sys.serializeState(baselineBuilder) - unexpectedDiff.WriteString(sys.baselinePrograms(baselineBuilder, fmt.Sprintf("Edit [%d]:: %s\n", index, do.caption))) - }) - wg.Queue(func() { - // Compute build with all the edits - nonIncrementalSys = newTestSys(test, true) - for i := range index + 1 { - if test.edits[i].edit != nil { - test.edits[i].edit(nonIncrementalSys) - } - } - execute.CommandLine(nonIncrementalSys, commandLineArgs, nonIncrementalSys) - }) - wg.RunAndWait() - - diff := getDiffForIncremental(sys, nonIncrementalSys) - if diff != "" { - baselineBuilder.WriteString(fmt.Sprintf("\n\nDiff:: %s\n", core.IfElse(do.expectedDiff == "", "!!! Unexpected diff, please review and either fix or write explanation as expectedDiff !!!", do.expectedDiff))) - baselineBuilder.WriteString(diff) - if do.expectedDiff == "" { - unexpectedDiff.WriteString(fmt.Sprintf("Edit [%d]:: %s\n!!! Unexpected diff, please review and either fix or write explanation as expectedDiff !!!\n%s\n", index, do.caption, diff)) - } - } else if do.expectedDiff != "" { - baselineBuilder.WriteString(fmt.Sprintf("\n\nDiff:: %s !!! Diff not found but explanation present, please review and remove the explanation !!!\n", do.expectedDiff)) - unexpectedDiff.WriteString(fmt.Sprintf("Edit [%d]:: %s\n!!! Diff not found but explanation present, please review and remove the explanation !!!\n", index, do.caption)) - } - } - baseline.Run(t, strings.ReplaceAll(test.subScenario, " ", "-")+".js", baselineBuilder.String(), baseline.Options{Subfolder: filepath.Join(test.getBaselineSubFolder(), scenario)}) - if unexpectedDiff.String() != "" { - t.Errorf("Test %s has unexpected diff %s with incremental build, please review the baseline file", test.subScenario, unexpectedDiff.String()) + state := test.start(t, scenario) + for _, do := range test.edits { + test.runEdit(state, do) } + test.end(state) }) } +// tscInputState holds the per-run state created by [tscInput.start] and +// threaded through [tscInput.runEdit] and [tscInput.end]. It is used both by +// the legacy declarative [tscInput.run] entry point and by the imperative +// Start/Edit/End methods on [TestSpec] used by generated test files. +type tscInputState struct { + t *testing.T + scenario string + sys *TestSys + result tsc.CommandLineResult + baselineBuilder *strings.Builder + unexpectedDiff *strings.Builder + // editOps records the file-system operations observed while running each + // edit. Only populated when the test was not loaded from an extracted + // source file, since generated tests do not need to re-emit themselves. + editOps [][]capturedEditOp + // appliedEdits is the list of edits that have been run so far (in order). + // The non-incremental comparison build needs to replay every preceding + // edit before applying the current one, so we keep them around for the + // lifetime of the test. + appliedEdits []*tscEdit + // editIndex is the 0-based index of the next edit to be run. + editIndex int + // ended indicates that [tscInput.end] has already run, so subsequent + // Edit/End calls can be rejected. + ended bool +} + +// start performs the initial build for a test and returns the in-progress +// state. Callers must invoke runEdit zero or more times followed by end. +func (test *tscInput) start(t *testing.T, scenario string) *tscInputState { + t.Helper() + state := &tscInputState{ + t: t, + scenario: scenario, + baselineBuilder: &strings.Builder{}, + unexpectedDiff: &strings.Builder{}, + } + state.sys = newTestSys(test, false) + fmt.Fprint( + state.baselineBuilder, + "currentDirectory::", + state.sys.GetCurrentDirectory(), + "\nuseCaseSensitiveFileNames::", + state.sys.FS().UseCaseSensitiveFileNames(), + "\nInput::\n", + ) + state.sys.baselineFSwithDiff(state.baselineBuilder) + state.result = test.executeCommand(state.sys, state.baselineBuilder, test.commandLineArgs) + state.sys.serializeState(state.baselineBuilder) + state.unexpectedDiff.WriteString(state.sys.baselinePrograms(state.baselineBuilder, "Initial build")) + return state +} + +// runEdit applies a single edit to the in-progress state, runs the +// incremental and non-incremental builds, and appends the result to the +// baseline being accumulated. +func (test *tscInput) runEdit(state *tscInputState, do *tscEdit) { + if state.ended { + panic("tscInput.runEdit called after end") + } + index := state.editIndex + state.editIndex++ + state.appliedEdits = append(state.appliedEdits, do) + extractEdits := !test.extracted + + sys := state.sys + sys.clearOutput() + var nonIncrementalSys *TestSys + commandLineArgs := core.IfElse(do.commandLineArgs == nil, test.commandLineArgs, do.commandLineArgs) + state.baselineBuilder.WriteString(fmt.Sprintf("\n\nEdit [%d]:: %s\n", index, do.caption)) + var beforeSnap map[string]capturedFsEntry + if extractEdits { + beforeSnap = captureFsSnapshot(sys) + } + if do.edit != nil { + do.edit(sys) + } + if extractEdits { + for len(state.editOps) <= index { + state.editOps = append(state.editOps, nil) + } + state.editOps[index] = diffFsSnapshots(beforeSnap, captureFsSnapshot(sys)) + } + sys.baselineFSwithDiff(state.baselineBuilder) + + if state.result.Watcher == nil { + test.executeCommand(sys, state.baselineBuilder, commandLineArgs) + } else { + state.result.Watcher.DoCycle() + } + sys.serializeState(state.baselineBuilder) + state.unexpectedDiff.WriteString(sys.baselinePrograms(state.baselineBuilder, fmt.Sprintf("Edit [%d]:: %s\n", index, do.caption))) + + // Compute build with all the edits applied so far in order. + nonIncrementalSys = newTestSys(test, true) + for _, e := range state.appliedEdits { + if e.edit != nil { + e.edit(nonIncrementalSys) + } + } + execute.CommandLine(nonIncrementalSys, commandLineArgs, nonIncrementalSys) + + diff := getDiffForIncremental(sys, nonIncrementalSys) + if diff != "" { + state.baselineBuilder.WriteString(fmt.Sprintf("\n\nDiff:: %s\n", core.IfElse(do.expectedDiff == "", "!!! Unexpected diff, please review and either fix or write explanation as expectedDiff !!!", do.expectedDiff))) + state.baselineBuilder.WriteString(diff) + if do.expectedDiff == "" { + state.unexpectedDiff.WriteString(fmt.Sprintf("Edit [%d]:: %s\n!!! Unexpected diff, please review and either fix or write explanation as expectedDiff !!!\n%s\n", index, do.caption, diff)) + } + } else if do.expectedDiff != "" { + state.baselineBuilder.WriteString(fmt.Sprintf("\n\nDiff:: %s !!! Diff not found but explanation present, please review and remove the explanation !!!\n", do.expectedDiff)) + state.unexpectedDiff.WriteString(fmt.Sprintf("Edit [%d]:: %s\n!!! Diff not found but explanation present, please review and remove the explanation !!!\n", index, do.caption)) + } +} + +// end finalises the run by writing the extracted test source file (when +// applicable), running the baseline comparison, and reporting unexpected +// diffs against the non-incremental build. +func (test *tscInput) end(state *tscInputState) { + if state.ended { + panic("tscInput.end called twice") + } + state.ended = true + if !test.extracted { + test.writeTestSourceFile(state.scenario, state.editOps) + } + baseline.Run(state.t, strings.ReplaceAll(test.subScenario, " ", "-")+".js", state.baselineBuilder.String(), baseline.Options{Subfolder: filepath.Join(test.getBaselineSubFolder(), state.scenario)}) + if state.unexpectedDiff.String() != "" { + state.t.Errorf("Test %s has unexpected diff %s with incremental build, please review the baseline file", test.subScenario, state.unexpectedDiff.String()) + } +} + func getDiffForIncremental(incrementalSys *TestSys, nonIncrementalSys *TestSys) string { var diffBuilder strings.Builder diff --git a/internal/execute/tsctests/spec.go b/internal/execute/tsctests/spec.go new file mode 100644 index 00000000000..3f3c44f3135 --- /dev/null +++ b/internal/execute/tsctests/spec.go @@ -0,0 +1,98 @@ +package tsctests + +import "testing" + +// TestSpec is the exported representation of a tscInput. It exists so that +// generated test files in subpackages can construct and drive a single test +// scenario through the [TestSpec.Start], [TestSpec.Edit], and [TestSpec.End] +// methods. +type TestSpec struct { + // Scenario is the grouping label normally passed to (*tscInput).run, e.g. + // "commandLine", "noEmit", or "extends". Used as part of the baseline path. + Scenario string + + // SubScenario is the per-test sub-name used by the baseline runner. + SubScenario string + + CommandLineArgs []string + Files FileMap + Cwd string + Env map[string]string + IgnoreCase bool + WindowsStyleRoot string + + // input and state are populated by Start and consumed by Edit/End. + input *tscInput + state *tscInputState +} + +// TestEdit is the exported representation of a tscEdit. +type TestEdit struct { + Caption string + CommandLineArgs []string + Edit func(*TestSys) + ExpectedDiff string +} + +// Start performs the initial build for the spec on the provided testing.T. +// It must be called exactly once before any call to Edit or End, and is +// responsible for calling t.Parallel so the extracted tests run concurrently. +func (s *TestSpec) Start(t *testing.T) { + t.Helper() + if s.input != nil { + panic("TestSpec.Start called twice") + } + s.input = &tscInput{ + subScenario: s.SubScenario, + commandLineArgs: s.CommandLineArgs, + files: s.Files, + cwd: s.Cwd, + env: s.Env, + ignoreCase: s.IgnoreCase, + windowsStyleRoot: s.WindowsStyleRoot, + extracted: true, + } + t.Parallel() + s.state = s.input.start(t, s.Scenario) +} + +// Edit applies the given edit to the running test and runs the incremental +// and non-incremental builds, accumulating the result into the baseline. +// Passing nil is treated as a "no change" edit. +func (s *TestSpec) Edit(e *TestEdit) { + if s.state == nil { + panic("TestSpec.Edit called before Start") + } + if e == nil { + s.input.runEdit(s.state, noChange) + return + } + s.input.runEdit(s.state, &tscEdit{ + caption: e.Caption, + commandLineArgs: e.CommandLineArgs, + edit: e.Edit, + expectedDiff: e.ExpectedDiff, + }) +} + +// End finalises the run, writing the accumulated baseline and reporting any +// unexpected diffs against the non-incremental build. +func (s *TestSpec) End() { + if s.state == nil { + panic("TestSpec.End called before Start") + } + s.input.end(s.state) +} + +// WriteFile writes content to the given path on the test file system, +// panicking on error. Exposed so generated tests can describe edits as a +// series of file system operations. +func (s *TestSys) WriteFile(path string, content string) { + s.writeFileNoError(path, content) +} + +// Remove removes the file or directory at path on the test file system, +// panicking on error. Exposed for generated edit functions. +func (s *TestSys) Remove(path string) { + s.removeNoError(path) +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go new file mode 100644 index 00000000000..41c0f274023 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go @@ -0,0 +1,84 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "configFileErrors", + SubScenario: "reports syntax errors in config file", + CommandLineArgs: []string{"--b", "-w"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export function foo() { }", + "/home/src/workspaces/project/b.ts": "export function bar() { }", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, + "files": [ + "a.ts" + "b.ts" + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "reports syntax errors after change to config file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "composite": true, "declaration": true + }, + "files": [ + "a.ts" + "b.ts" + ] +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "reports syntax errors after change to ts file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export function foo() { }export function fooBar() { }") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "reports error when there is no change to tsconfig file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "composite": true, "declaration": true + }, + "files": [ + "a.ts" + "b.ts" + ] +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "builds after fixing config file errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "composite": true, "declaration": true + }, + "files": [ + "a.ts", + "b.ts" + ] +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_bad_reference_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_bad_reference_test.go new file mode 100644 index 00000000000..20343c8b8cf --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_bad_reference_test.go @@ -0,0 +1,120 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_demo_updates_with_bad_reference(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "demo", + SubScenario: "updates with bad reference", + CommandLineArgs: []string{"--b", "-w", "--verbose"}, + Cwd: "/user/username/projects/demo", + Files: tsctests.FileMap{ + "/user/username/projects/demo/animals/animal.ts": `export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +}`, + "/user/username/projects/demo/animals/dog.ts": "import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "/user/username/projects/demo/animals/index.ts": `import Animal from './animal'; + +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog };`, + "/user/username/projects/demo/animals/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [ + { "path": "../core" } + ] +}`, + "/user/username/projects/demo/core/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, +}`, + "/user/username/projects/demo/core/utilities.ts": `import * as A from '../animals' +export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +}`, + "/user/username/projects/demo/tsconfig-base.json": `{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + }, +}`, + "/user/username/projects/demo/tsconfig.json": `{ + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals", + }, + { + "path": "./zoo", + }, + ], +}`, + "/user/username/projects/demo/zoo/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] +}`, + "/user/username/projects/demo/zoo/zoo.ts": `import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Prepend a line", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/demo/core/utilities.ts", ` +import * as A from '../animals' +export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_circular_reference_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_circular_reference_test.go new file mode 100644 index 00000000000..69fe1e981c6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_circular_reference_test.go @@ -0,0 +1,121 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_demo_updates_with_circular_reference(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "demo", + SubScenario: "updates with circular reference", + CommandLineArgs: []string{"--b", "-w", "--verbose"}, + Cwd: "/user/username/projects/demo", + Files: tsctests.FileMap{ + "/user/username/projects/demo/animals/animal.ts": `export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +}`, + "/user/username/projects/demo/animals/dog.ts": "import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "/user/username/projects/demo/animals/index.ts": `import Animal from './animal'; + +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog };`, + "/user/username/projects/demo/animals/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [ + { "path": "../core" } + ] +}`, + "/user/username/projects/demo/core/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, + "references": [ + { + "path": "../zoo", + } + ] +}`, + "/user/username/projects/demo/core/utilities.ts": `export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +}`, + "/user/username/projects/demo/tsconfig-base.json": `{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + }, +}`, + "/user/username/projects/demo/tsconfig.json": `{ + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals", + }, + { + "path": "./zoo", + }, + ], +}`, + "/user/username/projects/demo/zoo/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] +}`, + "/user/username/projects/demo/zoo/zoo.ts": `import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/demo/core/tsconfig.json", `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_extends_configDir_template_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_extends_configDir_template_test.go new file mode 100644 index 00000000000..e6ebf759f81 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_extends_configDir_template_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_extends_configDir_template(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "extends", + SubScenario: "configDir template", + CommandLineArgs: []string{"--b", "-w", "--explainFiles", "--v"}, + Cwd: "/home/src/projects/myproject", + Files: tsctests.FileMap{ + "/home/src/projects/configs/first/tsconfig.json": `{ + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["root1", "${configDir}/root2", "root3"], + "types": [], + }, +}`, + "/home/src/projects/configs/second/tsconfig.json": `{ + "files": ["${configDir}/main.ts"], + "compilerOptions": { + "declarationDir": "${configDir}/decls", + "paths": { + "@myscope/*": ["${configDir}/types/*"], + }, + }, + "watchOptions": { + "excludeFiles": ["${configDir}/main.ts"], + }, +}`, + "/home/src/projects/myproject/main.ts": `// some comment +export const y = 10; +import { x } from "@myscope/sometype";`, + "/home/src/projects/myproject/tsconfig.json": `{ + "extends": "../configs/first/tsconfig.json", + "compilerOptions": { + "declaration": true, + "outDir": "outDir", + "traceResolution": true, + }, +}`, + "/home/src/projects/myproject/types/sometype.ts": "export const x = 10;", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "edit extended config file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/configs/first/tsconfig.json", `{ + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["${configDir}/root2"], + "types": [], + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_test.go new file mode 100644 index 00000000000..045b8f766b9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_test.go @@ -0,0 +1,73 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_libraryResolution_with_config(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "libraryResolution", + SubScenario: "with config", + CommandLineArgs: []string{"-b", "-w", "project1", "project2", "project3", "project4", "--verbose", "--explainFiles"}, + Cwd: "/home/src/workspace/projects", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.dom.d.ts": "interface DOMInterface { }", + "/home/src/tslibs/TS/Lib/lib.scripthost.d.ts": "interface ScriptHostInterface { }", + "/home/src/tslibs/TS/Lib/lib.webworker.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/unlreated/index.d.ts": "export const unrelated = 10;", + "/home/src/workspace/projects/project1/core.d.ts": "export const core = 10;", + "/home/src/workspace/projects/project1/file.ts": "export const file = 10;", + "/home/src/workspace/projects/project1/file2.ts": `/// +/// +/// `, + "/home/src/workspace/projects/project1/index.ts": "export const x = \"type1\";", + "/home/src/workspace/projects/project1/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot1"], + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts": "export type TheNum = \"type1\";", + "/home/src/workspace/projects/project1/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project2/index.ts": "export const y = 10", + "/home/src/workspace/projects/project2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project2/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project3/index.ts": "export const z = 10", + "/home/src/workspace/projects/project3/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project3/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project4/index.ts": "export const z = 10", + "/home/src/workspace/projects/project4/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["esnext", "dom", "webworker"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project4/utils.d.ts": "export const y = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go new file mode 100644 index 00000000000..033091337bc --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go @@ -0,0 +1,120 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "libraryResolution", + SubScenario: "with config with libReplacement", + CommandLineArgs: []string{"-b", "-w", "project1", "project2", "project3", "project4", "--verbose", "--explainFiles"}, + Cwd: "/home/src/workspace/projects", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.dom.d.ts": "interface DOMInterface { }", + "/home/src/tslibs/TS/Lib/lib.scripthost.d.ts": "interface ScriptHostInterface { }", + "/home/src/tslibs/TS/Lib/lib.webworker.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts": "interface DOMInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; };`, + "/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; };`, + "/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.d.ts": "interface ScriptHostInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/unlreated/index.d.ts": "export const unrelated = 10;", + "/home/src/workspace/projects/project1/core.d.ts": "export const core = 10;", + "/home/src/workspace/projects/project1/file.ts": "export const file = 10;", + "/home/src/workspace/projects/project1/file2.ts": `/// +/// +/// `, + "/home/src/workspace/projects/project1/index.ts": "export const x = \"type1\";", + "/home/src/workspace/projects/project1/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot1"], + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts": "export type TheNum = \"type1\";", + "/home/src/workspace/projects/project1/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project2/index.ts": "export const y = 10", + "/home/src/workspace/projects/project2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project2/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project3/index.ts": "export const z = 10", + "/home/src/workspace/projects/project3/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project3/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project4/index.ts": "export const z = 10", + "/home/src/workspace/projects/project4/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["esnext", "dom", "webworker"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project4/utils.d.ts": "export const y = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go new file mode 100644 index 00000000000..52696bd46c0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go @@ -0,0 +1,74 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "build mode watches for changes to package-json main fields", + CommandLineArgs: []string{"-b", "packages/pkg1", "--verbose", "-w", "--traceResolution"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/node_modules/pkg2": vfstest.Symlink("/user/username/projects/myproject/packages/pkg2"), + "/user/username/projects/myproject/packages/pkg1/index.ts": `import type { TheNum } from 'pkg2' +export const theNum: TheNum = 42;`, + "/user/username/projects/myproject/packages/pkg1/package.json": `{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js" +}`, + "/user/username/projects/myproject/packages/pkg1/tsconfig.json": `{ + "compilerOptions": { + "outDir": "build", + }, + "references": [{ "path": "../pkg2" }], +}`, + "/user/username/projects/myproject/packages/pkg2/const.ts": "export type TheNum = 42;", + "/user/username/projects/myproject/packages/pkg2/index.ts": "export type { TheNum } from './const.js';", + "/user/username/projects/myproject/packages/pkg2/other.ts": "export type TheStr = string;", + "/user/username/projects/myproject/packages/pkg2/package.json": `{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js" +}`, + "/user/username/projects/myproject/packages/pkg2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "build", + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "reports import errors after change to package file", + ExpectedDiff: "Package.json watch pending, so no change detected yet", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/packages/pkg2/package.json", `{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/other.js" +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "removes those errors when a package file is changed back", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/packages/pkg2/package.json", `{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js" +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go new file mode 100644 index 00000000000..23296ada783 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go @@ -0,0 +1,58 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "handles the cache correctly when two projects use different module resolution settings", + CommandLineArgs: []string{"--b", "-w", "-v"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/node_modules/@types/bar/index.d.ts": "export const bar = 10;", + "/user/username/projects/myproject/node_modules/@types/foo/index.d.ts": "export const foo = 10;", + "/user/username/projects/myproject/project1/index.ts": "import { foo } from \"file\";", + "/user/username/projects/myproject/project1/node_modules/file/index.d.ts": "export const foo = 10;", + "/user/username/projects/myproject/project1/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "types": ["foo", "bar"] + }, + "files": ["index.ts"], +}`, + "/user/username/projects/myproject/project2/index.ts": "import { foo } from \"file\";", + "/user/username/projects/myproject/project2/node_modules/file/index.d.ts": "export const foo = 10;", + "/user/username/projects/myproject/project2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "types": ["foo"], + "module": "nodenext", + "moduleResolution": "nodenext" + }, + "files": ["index.ts"], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "files": [], + "references": [ + { "path": "./project1" }, + { "path": "./project2" }, + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Append text", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/project1/index.ts", "import { foo } from \"file\";const bar = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go new file mode 100644 index 00000000000..febc97498b4 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go @@ -0,0 +1,106 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "resolves specifier in output declaration file from referenced project correctly with cts and mts extensions", + CommandLineArgs: []string{"-b", "packages/pkg1", "-w", "--verbose", "--traceResolution"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/node_modules/pkg2": vfstest.Symlink("/user/username/projects/myproject/packages/pkg2"), + "/user/username/projects/myproject/packages/pkg1/index.ts": `import type { TheNum } from 'pkg2' +export const theNum: TheNum = 42;`, + "/user/username/projects/myproject/packages/pkg1/package.json": `{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js", + "type": "module" +}`, + "/user/username/projects/myproject/packages/pkg1/tsconfig.json": `{ + "compilerOptions": { + "outDir": "build", + "module": "node16", + }, + "references": [{ "path": "../pkg2" }], +}`, + "/user/username/projects/myproject/packages/pkg2/const.cts": "export type TheNum = 42;", + "/user/username/projects/myproject/packages/pkg2/index.ts": "export type { TheNum } from './const.cjs';", + "/user/username/projects/myproject/packages/pkg2/package.json": `{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js", + "type": "module" +}`, + "/user/username/projects/myproject/packages/pkg2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "build", + "module": "node16", + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "reports import errors after change to package file", + ExpectedDiff: "Package.json watch pending, so no change detected yet", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/packages/pkg1/package.json", `{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js", + "type": "commonjs" +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "removes those errors when a package file is changed back", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/packages/pkg1/package.json", `{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js", + "type": "module" +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "reports import errors after change to package file", + ExpectedDiff: "Package.json watch pending, so no change detected yet", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/packages/pkg1/package.json", `{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js", + "type": "commonjs" +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "removes those errors when a package file is changed to cjs extensions", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/user/username/projects/myproject/packages/pkg2/index.ts") + sys.WriteFile("/user/username/projects/myproject/packages/pkg2/index.cts", "export type { TheNum } from './const.cjs';") + sys.WriteFile("/user/username/projects/myproject/packages/pkg2/package.json", `{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.cjs", + "type": "module" +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_test.go new file mode 100644 index 00000000000..67c4778eee3 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_test.go @@ -0,0 +1,133 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmitOnError_noEmitOnError(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "noEmitOnError", + CommandLineArgs: []string{"-b", "-w", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix syntax errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "semantic errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix semantic errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix dts errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go new file mode 100644 index 00000000000..95db3640323 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go @@ -0,0 +1,133 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "noEmitOnError with declaration", + CommandLineArgs: []string{"-b", "-w", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix syntax errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "semantic errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix semantic errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix dts errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go new file mode 100644 index 00000000000..76fd2dfd957 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go @@ -0,0 +1,133 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "noEmitOnError with declaration with incremental", + CommandLineArgs: []string{"-b", "-w", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix syntax errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "semantic errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix semantic errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix dts errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go new file mode 100644 index 00000000000..d83ca2fff4c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go @@ -0,0 +1,133 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "noEmitOnError with incremental", + CommandLineArgs: []string{"-b", "-w", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix syntax errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "semantic errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix semantic errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix dts errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go new file mode 100644 index 00000000000..82974608a7f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go @@ -0,0 +1,44 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "does not go in loop when watching when no files are emitted", + CommandLineArgs: []string{"-b", "-w", "-verbose"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/a.js": "", + "/user/username/projects/myproject/b.ts": "", + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { + "allowJs": true, + "noEmit": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/a.js", "") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/a.js", "const x = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go new file mode 100644 index 00000000000..0cb60057612 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go @@ -0,0 +1,44 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "does not go in loop when watching when no files are emitted with incremental", + CommandLineArgs: []string{"-b", "-w", "-verbose", "--incremental"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/a.js": "", + "/user/username/projects/myproject/b.ts": "", + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { + "allowJs": true, + "noEmit": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/a.js", "") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/a.js", "const x = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_test.go new file mode 100644 index 00000000000..ed897e748fa --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_test.go @@ -0,0 +1,91 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_dts_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..94e36bfe37c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go @@ -0,0 +1,92 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with incremental as modules", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_test.go new file mode 100644 index 00000000000..9bf8c6cdf4a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_test.go @@ -0,0 +1,91 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_dts_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with incremental", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go new file mode 100644 index 00000000000..bb6dacab43b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go @@ -0,0 +1,91 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..ee988af242e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go @@ -0,0 +1,92 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled with incremental as modules", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go new file mode 100644 index 00000000000..5527fbf6ee5 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go @@ -0,0 +1,91 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled with incremental", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_test.go new file mode 100644 index 00000000000..dfe36ba4666 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_test.go @@ -0,0 +1,91 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_semantic_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a: number = \"hello\"", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..68d923cfce3 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go @@ -0,0 +1,92 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors with incremental as modules", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a: number = \"hello\"", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go new file mode 100644 index 00000000000..9384c0efbfd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go @@ -0,0 +1,91 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_semantic_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors with incremental", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a: number = \"hello\"", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_test.go new file mode 100644 index 00000000000..4c32ed8469c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_test.go @@ -0,0 +1,91 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_syntax_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = \"hello", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..509d4dd2d8e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go @@ -0,0 +1,92 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors with incremental as modules", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = \"hello", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go new file mode 100644 index 00000000000..f823412cc21 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go @@ -0,0 +1,91 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_noEmit_syntax_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors with incremental", + CommandLineArgs: []string{"-b", "-verbose", "-w"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = \"hello", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no Emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go new file mode 100644 index 00000000000..5192a008801 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go @@ -0,0 +1,49 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "declarationEmitErrors introduceError when file with no error changes", + CommandLineArgs: []string{"-b", "-w", "app"}, + Cwd: "/user/username/projects/solution", + Files: tsctests.FileMap{ + "/user/username/projects/solution/app/fileWithError.ts": `export var myClassWithError = class { + tags() { } + +};`, + "/user/username/projects/solution/app/fileWithoutError.ts": "export class myClass { }", + "/user/username/projects/solution/app/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/solution/app/fileWithError.ts", `export var myClassWithError = class { + tags() { } + private p = 12 +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Change fileWithoutError", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/solution/app/fileWithoutError.ts", "export class myClass2 { }") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go new file mode 100644 index 00000000000..8cedb4e6bb2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go @@ -0,0 +1,52 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "declarationEmitErrors introduceError when fixing errors only changed file is emitted", + CommandLineArgs: []string{"-b", "-w", "app"}, + Cwd: "/user/username/projects/solution", + Files: tsctests.FileMap{ + "/user/username/projects/solution/app/fileWithError.ts": `export var myClassWithError = class { + tags() { } + +};`, + "/user/username/projects/solution/app/fileWithoutError.ts": "export class myClass { }", + "/user/username/projects/solution/app/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/solution/app/fileWithError.ts", `export var myClassWithError = class { + tags() { } + private p = 12 +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/solution/app/fileWithError.ts", `export var myClassWithError = class { + tags() { } + +};`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go new file mode 100644 index 00000000000..6174663aa42 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "declarationEmitErrors when file with no error changes", + CommandLineArgs: []string{"-b", "-w", "app"}, + Cwd: "/user/username/projects/solution", + Files: tsctests.FileMap{ + "/user/username/projects/solution/app/fileWithError.ts": `export var myClassWithError = class { + tags() { } + private p = 12 +};`, + "/user/username/projects/solution/app/fileWithoutError.ts": "export class myClass { }", + "/user/username/projects/solution/app/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Change fileWithoutError", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/solution/app/fileWithoutError.ts", "export class myClass2 { }") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go new file mode 100644 index 00000000000..fad9e0c3130 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go @@ -0,0 +1,42 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "declarationEmitErrors when fixing error files all files are emitted", + CommandLineArgs: []string{"-b", "-w", "app"}, + Cwd: "/user/username/projects/solution", + Files: tsctests.FileMap{ + "/user/username/projects/solution/app/fileWithError.ts": `export var myClassWithError = class { + tags() { } + private p = 12 +};`, + "/user/username/projects/solution/app/fileWithoutError.ts": "export class myClass { }", + "/user/username/projects/solution/app/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/solution/app/fileWithError.ts", `export var myClassWithError = class { + tags() { } + +};`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go new file mode 100644 index 00000000000..d537d30db94 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go @@ -0,0 +1,25 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "tsbuildinfo has error", + CommandLineArgs: []string{"--b", "-i", "-w"}, + Cwd: "/user/username/projects/project", + Files: tsctests.FileMap{ + "/user/username/projects/project/main.ts": "export const x = 10;", + "/user/username/projects/project/tsconfig.json": "{}", + "/user/username/projects/project/tsconfig.tsbuildinfo": "Some random string", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go new file mode 100644 index 00000000000..3ff2177dab3 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go @@ -0,0 +1,77 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "when referenced project change introduces error in the down stream project and then fixes it", + CommandLineArgs: []string{"-b", "-w", "App"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/App/app.ts": `import { createSomeObject } from "../Library/library"; +createSomeObject().message;`, + "/user/username/projects/sample1/App/tsconfig.json": `{ + "references": [{ "path": "../Library" }] +}`, + "/user/username/projects/sample1/Library/library.ts": `interface SomeObject +{ + message: string; +} + +export function createSomeObject(): SomeObject +{ + return { + message: "new Object" + }; +}`, + "/user/username/projects/sample1/Library/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/Library/library.ts", `interface SomeObject +{ + message2: string; +} + +export function createSomeObject(): SomeObject +{ + return { + message2: "new Object" + }; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/Library/library.ts", `interface SomeObject +{ + message: string; +} + +export function createSomeObject(): SomeObject +{ + return { + message: "new Object" + }; +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go new file mode 100644 index 00000000000..d51bde3dedd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go @@ -0,0 +1,74 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "works correctly when project with extended config is removed", + CommandLineArgs: []string{"-b", "-w", "-v"}, + Cwd: "/user/username/projects/project", + Files: tsctests.FileMap{ + "/user/username/projects/project/alpha.tsconfig.json": `{ + "compilerOptions": { + "strict": true, + }, +}`, + "/user/username/projects/project/bravo.tsconfig.json": `{ + "compilerOptions": { + "strict": true, + }, +}`, + "/user/username/projects/project/commonFile1.ts": "let x = 1", + "/user/username/projects/project/commonFile2.ts": "let y = 1", + "/user/username/projects/project/other.ts": "let z = 0;", + "/user/username/projects/project/project1.tsconfig.json": `{ + "extends": "./alpha.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["commonFile1.ts", "commonFile2.ts"], +}`, + "/user/username/projects/project/project2.tsconfig.json": `{ + "extends": "./bravo.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["other.ts"], +}`, + "/user/username/projects/project/tsconfig.json": `{ + "references": [ + { + "path": "./project1.tsconfig.json", + }, + { + "path": "./project2.tsconfig.json", + }, + ], + "files": [], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Remove project2 from base config", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/project/tsconfig.json", `{ + "references": [ + { + "path": "./project1.tsconfig.json", + }, + ], + "files": [], +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go new file mode 100644 index 00000000000..466b4248603 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "works when noUnusedParameters changes to false", + CommandLineArgs: []string{"-b", "-w"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/index.ts": "const fn = (a: string, b: string) => b;", + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { + "noUnusedParameters": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Change tsconfig to set noUnusedParameters to false", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/tsconfig.json", `{ + "compilerOptions": { + "noUnusedParameters": false, + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_with_extended_source_files_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_with_extended_source_files_test.go new file mode 100644 index 00000000000..848404b55ab --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_with_extended_source_files_test.go @@ -0,0 +1,135 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_programUpdates_works_with_extended_source_files(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "works with extended source files", + CommandLineArgs: []string{"-b", "-w", "-v", "project1.tsconfig.json", "project2.tsconfig.json", "project3.tsconfig.json"}, + Cwd: "/user/username/projects/project", + Files: tsctests.FileMap{ + "/user/username/projects/project/alpha.tsconfig.json": "{}", + "/user/username/projects/project/bravo.tsconfig.json": `{ + "extends": "./alpha.tsconfig.json", +}`, + "/user/username/projects/project/commonFile1.ts": "let x = 1", + "/user/username/projects/project/commonFile2.ts": "let y = 1", + "/user/username/projects/project/extendsConfig1.tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, +}`, + "/user/username/projects/project/extendsConfig2.tsconfig.json": `{ + "compilerOptions": { + "strictNullChecks": false, + }, +}`, + "/user/username/projects/project/extendsConfig3.tsconfig.json": `{ + "compilerOptions": { + "noImplicitAny": true, + }, +}`, + "/user/username/projects/project/other.ts": "let z = 0;", + "/user/username/projects/project/other2.ts": "let k = 0;", + "/user/username/projects/project/project1.tsconfig.json": `{ + "extends": "./alpha.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["commonFile1.ts", "commonFile2.ts"], +}`, + "/user/username/projects/project/project2.tsconfig.json": `{ + "extends": "./bravo.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["other.ts"], +}`, + "/user/username/projects/project/project3.tsconfig.json": `{ + "extends": [ + "./extendsConfig1.tsconfig.json", + "./extendsConfig2.tsconfig.json", + "./extendsConfig3.tsconfig.json", + ], + "compilerOptions": { + "composite": false, + }, + "files": ["other2.ts"], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Modify alpha config", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/project/alpha.tsconfig.json", `{ + "compilerOptions": { + "strict": true + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change bravo config", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/project/bravo.tsconfig.json", `{ + "extends": "./alpha.tsconfig.json", + "compilerOptions": { "strict": false } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "project 2 extends alpha", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/project/project2.tsconfig.json", `{ + "extends": "./alpha.tsconfig.json", + "files": ["other.ts"] +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "update aplha config", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/project/alpha.tsconfig.json", "{}") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Modify extendsConfigFile2", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/project/extendsConfig2.tsconfig.json", `{ + "compilerOptions": { "strictNullChecks": true } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Modify project 3", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/project/project3.tsconfig.json", `{ + "extends": ["./extendsConfig1.tsconfig.json", "./extendsConfig2.tsconfig.json"], + "compilerOptions": { "composite": false }, + "files": ["other2.ts"], +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Delete extendedConfigFile2 and report error", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/user/username/projects/project/extendsConfig2.tsconfig.json") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go new file mode 100644 index 00000000000..fc3a341d2e5 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go @@ -0,0 +1,187 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 23 projects in a solution", + CommandLineArgs: []string{"-b", "-w", "-v"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg10/index.ts": "export const pkg10 = 10;", + "/user/username/projects/myproject/pkg10/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg11/index.ts": "export const pkg11 = 11;", + "/user/username/projects/myproject/pkg11/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg12/index.ts": "export const pkg12 = 12;", + "/user/username/projects/myproject/pkg12/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg13/index.ts": "export const pkg13 = 13;", + "/user/username/projects/myproject/pkg13/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg14/index.ts": "export const pkg14 = 14;", + "/user/username/projects/myproject/pkg14/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg15/index.ts": "export const pkg15 = 15;", + "/user/username/projects/myproject/pkg15/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg16/index.ts": "export const pkg16 = 16;", + "/user/username/projects/myproject/pkg16/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg17/index.ts": "export const pkg17 = 17;", + "/user/username/projects/myproject/pkg17/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg18/index.ts": "export const pkg18 = 18;", + "/user/username/projects/myproject/pkg18/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg19/index.ts": "export const pkg19 = 19;", + "/user/username/projects/myproject/pkg19/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg20/index.ts": "export const pkg20 = 20;", + "/user/username/projects/myproject/pkg20/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg21/index.ts": "export const pkg21 = 21;", + "/user/username/projects/myproject/pkg21/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg22/index.ts": "export const pkg22 = 22;", + "/user/username/projects/myproject/pkg22/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg5/index.ts": "export const pkg5 = 5;", + "/user/username/projects/myproject/pkg5/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg6/index.ts": "export const pkg6 = 6;", + "/user/username/projects/myproject/pkg6/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg7/index.ts": "export const pkg7 = 7;", + "/user/username/projects/myproject/pkg7/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg8/index.ts": "export const pkg8 = 8;", + "/user/username/projects/myproject/pkg8/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg9/index.ts": "export const pkg9 = 9;", + "/user/username/projects/myproject/pkg9/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" }, + { "path": "./pkg5" }, + { "path": "./pkg6" }, + { "path": "./pkg7" }, + { "path": "./pkg8" }, + { "path": "./pkg9" }, + { "path": "./pkg10" }, + { "path": "./pkg11" }, + { "path": "./pkg12" }, + { "path": "./pkg13" }, + { "path": "./pkg14" }, + { "path": "./pkg15" }, + { "path": "./pkg16" }, + { "path": "./pkg17" }, + { "path": "./pkg18" }, + { "path": "./pkg19" }, + { "path": "./pkg20" }, + { "path": "./pkg21" }, + { "path": "./pkg22" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go new file mode 100644 index 00000000000..4a199682fd0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go @@ -0,0 +1,187 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 23 projects in a solution with --builders 3", + CommandLineArgs: []string{"-b", "-w", "-v", "--builders", "3"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg10/index.ts": "export const pkg10 = 10;", + "/user/username/projects/myproject/pkg10/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg11/index.ts": "export const pkg11 = 11;", + "/user/username/projects/myproject/pkg11/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg12/index.ts": "export const pkg12 = 12;", + "/user/username/projects/myproject/pkg12/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg13/index.ts": "export const pkg13 = 13;", + "/user/username/projects/myproject/pkg13/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg14/index.ts": "export const pkg14 = 14;", + "/user/username/projects/myproject/pkg14/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg15/index.ts": "export const pkg15 = 15;", + "/user/username/projects/myproject/pkg15/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg16/index.ts": "export const pkg16 = 16;", + "/user/username/projects/myproject/pkg16/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg17/index.ts": "export const pkg17 = 17;", + "/user/username/projects/myproject/pkg17/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg18/index.ts": "export const pkg18 = 18;", + "/user/username/projects/myproject/pkg18/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg19/index.ts": "export const pkg19 = 19;", + "/user/username/projects/myproject/pkg19/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg20/index.ts": "export const pkg20 = 20;", + "/user/username/projects/myproject/pkg20/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg21/index.ts": "export const pkg21 = 21;", + "/user/username/projects/myproject/pkg21/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg22/index.ts": "export const pkg22 = 22;", + "/user/username/projects/myproject/pkg22/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg5/index.ts": "export const pkg5 = 5;", + "/user/username/projects/myproject/pkg5/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg6/index.ts": "export const pkg6 = 6;", + "/user/username/projects/myproject/pkg6/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg7/index.ts": "export const pkg7 = 7;", + "/user/username/projects/myproject/pkg7/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg8/index.ts": "export const pkg8 = 8;", + "/user/username/projects/myproject/pkg8/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg9/index.ts": "export const pkg9 = 9;", + "/user/username/projects/myproject/pkg9/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" }, + { "path": "./pkg5" }, + { "path": "./pkg6" }, + { "path": "./pkg7" }, + { "path": "./pkg8" }, + { "path": "./pkg9" }, + { "path": "./pkg10" }, + { "path": "./pkg11" }, + { "path": "./pkg12" }, + { "path": "./pkg13" }, + { "path": "./pkg14" }, + { "path": "./pkg15" }, + { "path": "./pkg16" }, + { "path": "./pkg17" }, + { "path": "./pkg18" }, + { "path": "./pkg19" }, + { "path": "./pkg20" }, + { "path": "./pkg21" }, + { "path": "./pkg22" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go new file mode 100644 index 00000000000..360535a1042 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go @@ -0,0 +1,67 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 3 projects in a solution", + CommandLineArgs: []string{"-b", "-w", "-v"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go new file mode 100644 index 00000000000..eb6a5962305 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go @@ -0,0 +1,67 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 3 projects in a solution with --builders 1", + CommandLineArgs: []string{"-b", "-w", "-v", "--builders", "1"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go new file mode 100644 index 00000000000..5c65bd2a0d6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go @@ -0,0 +1,79 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 5 projects in a solution", + CommandLineArgs: []string{"-b", "-w", "-v"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go new file mode 100644 index 00000000000..1183de9db2b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go @@ -0,0 +1,79 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 5 projects in a solution with --builders 2", + CommandLineArgs: []string{"-b", "-w", "-v", "--builders", "2"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go new file mode 100644 index 00000000000..224a90cc20c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go @@ -0,0 +1,97 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 8 projects in a solution", + CommandLineArgs: []string{"-b", "-w", "-v"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg5/index.ts": "export const pkg5 = 5;", + "/user/username/projects/myproject/pkg5/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg6/index.ts": "export const pkg6 = 6;", + "/user/username/projects/myproject/pkg6/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg7/index.ts": "export const pkg7 = 7;", + "/user/username/projects/myproject/pkg7/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" }, + { "path": "./pkg5" }, + { "path": "./pkg6" }, + { "path": "./pkg7" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go new file mode 100644 index 00000000000..80c3ba93112 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go @@ -0,0 +1,97 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 8 projects in a solution with --builders 3", + CommandLineArgs: []string{"-b", "-w", "-v", "--builders", "3"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg5/index.ts": "export const pkg5 = 5;", + "/user/username/projects/myproject/pkg5/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg6/index.ts": "export const pkg6 = 6;", + "/user/username/projects/myproject/pkg6/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg7/index.ts": "export const pkg7 = 7;", + "/user/username/projects/myproject/pkg7/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" }, + { "path": "./pkg5" }, + { "path": "./pkg6" }, + { "path": "./pkg7" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_reexport_Reports_errors_correctly_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_reexport_Reports_errors_correctly_test.go new file mode 100644 index 00000000000..a6d82e6be6a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_reexport_Reports_errors_correctly_test.go @@ -0,0 +1,73 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_reexport_Reports_errors_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "reexport", + SubScenario: "Reports errors correctly", + CommandLineArgs: []string{"-b", "-w", "-verbose", "src"}, + Cwd: "/user/username/projects/reexport", + Files: tsctests.FileMap{ + "/user/username/projects/reexport/src/main/index.ts": `import { Session } from "../pure"; + +export const session: Session = { + foo: 1 +};`, + "/user/username/projects/reexport/src/main/tsconfig.json": `{ + "compilerOptions": { + "outDir": "../../out", + "rootDir": "../", + }, + "include": ["**/*.ts"], + "references": [{ "path": "../pure" }], +}`, + "/user/username/projects/reexport/src/pure/index.ts": "export * from \"./session\";", + "/user/username/projects/reexport/src/pure/session.ts": `export interface Session { + foo: number; + // bar: number; +}`, + "/user/username/projects/reexport/src/pure/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "../../out", + "rootDir": "../", + }, + "include": ["**/*.ts"], +}`, + "/user/username/projects/reexport/src/tsconfig.json": `{ + "files": [], + "include": [], + "references": [{ "path": "./pure" }, { "path": "./main" }], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/reexport/src/pure/session.ts", `export interface Session { + foo: number; + bar: number; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/reexport/src/pure/session.ts", `export interface Session { + foo: number; + // bar: number; +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go new file mode 100644 index 00000000000..67c8b1f0622 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go @@ -0,0 +1,89 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "roots", + SubScenario: "when root file is from referenced project and shared is first", + CommandLineArgs: []string{"--b", "-w", "projects/server", "-v", "--traceResolution", "--explainFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/projects/server/src/server.ts": `import { MyClass } from ':shared/myClass.js'; +console.log('Hello, world!');`, + "/home/src/workspaces/solution/projects/server/tsconfig.json": `{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "..", + "outDir": "./dist", + "paths": { + ":shared/*": ["./src/../../shared/src/*"], + }, + }, + "include": [ "../shared/src/**/*.ts", "src/**/*.ts" ], + "references": [ + { "path": "../shared" }, + ], +}`, + "/home/src/workspaces/solution/projects/shared/src/logging.ts": `export function log(str: string) { + console.log(str); +}`, + "/home/src/workspaces/solution/projects/shared/src/myClass.ts": "export class MyClass { }", + "/home/src/workspaces/solution/projects/shared/src/random.ts": `export function randomFn(str: string) { + console.log(str); +}`, + "/home/src/workspaces/solution/projects/shared/tsconfig.json": `{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + }, + "include": ["src/**/*.ts"], +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "projects/server" }, + { "path": "projects/shared" }, + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "edit logging file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/projects/shared/src/logging.ts", `export function log(str: string) { + console.log(str); +}export const x = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete random file", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/solution/projects/shared/src/random.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go new file mode 100644 index 00000000000..d7fbfb34d9f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go @@ -0,0 +1,89 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "roots", + SubScenario: "when root file is from referenced project", + CommandLineArgs: []string{"--b", "-w", "projects/server", "-v", "--traceResolution", "--explainFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/projects/server/src/server.ts": `import { MyClass } from ':shared/myClass.js'; +console.log('Hello, world!');`, + "/home/src/workspaces/solution/projects/server/tsconfig.json": `{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "..", + "outDir": "./dist", + "paths": { + ":shared/*": ["./src/../../shared/src/*"], + }, + }, + "include": [ "src/**/*.ts", "../shared/src/**/*.ts" ], + "references": [ + { "path": "../shared" }, + ], +}`, + "/home/src/workspaces/solution/projects/shared/src/logging.ts": `export function log(str: string) { + console.log(str); +}`, + "/home/src/workspaces/solution/projects/shared/src/myClass.ts": "export class MyClass { }", + "/home/src/workspaces/solution/projects/shared/src/random.ts": `export function randomFn(str: string) { + console.log(str); +}`, + "/home/src/workspaces/solution/projects/shared/tsconfig.json": `{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + }, + "include": ["src/**/*.ts"], +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "projects/server" }, + { "path": "projects/shared" }, + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "edit logging file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/projects/shared/src/logging.ts", `export function log(str: string) { + console.log(str); +}export const x = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete random file", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/solution/projects/shared/src/random.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go new file mode 100644 index 00000000000..e3b187cbf17 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go @@ -0,0 +1,87 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "builds when new file is added, and its subsequent updates", + CommandLineArgs: []string{"--b", "-w", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Change to new File and build core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/newfile.ts", "export const newFileConst = 30;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Change to new File and build core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/newfile.ts", ` +export class someClass2 { }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go new file mode 100644 index 00000000000..f0dcdbd5456 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go @@ -0,0 +1,88 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "builds when new file is added, and its subsequent updates with circular references", + CommandLineArgs: []string{"--b", "-w", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true + }, + "references": [ + { "path": "../tests", "circular": true } + ], +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Change to new File and build core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/newfile.ts", "export const newFileConst = 30;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Change to new File and build core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/newfile.ts", ` +export class someClass2 { }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go new file mode 100644 index 00000000000..e298012d2a8 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go @@ -0,0 +1,102 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "change builds changes and reports found errors message", + CommandLineArgs: []string{"--b", "-w", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Make change to core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Revert core file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Make two changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } +export class someClass2 { }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go new file mode 100644 index 00000000000..297a653a3b9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go @@ -0,0 +1,103 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "change builds changes and reports found errors message with circular references", + CommandLineArgs: []string{"--b", "-w", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true + }, + "references": [ + { "path": "../tests", "circular": true } + ], +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Make change to core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Revert core file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Make two changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } +export class someClass2 { }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go new file mode 100644 index 00000000000..d87e4c9e29e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go @@ -0,0 +1,98 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "incremental updates in verbose mode", + CommandLineArgs: []string{"--b", "-w", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Make non dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/index.ts", `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +function someFn() { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Make dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/index.ts", `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +export function someFn() { }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go new file mode 100644 index 00000000000..e262b8c89c1 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go @@ -0,0 +1,82 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "non local change does not start build of referencing projects", + CommandLineArgs: []string{"--b", "-w", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Make local change to core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +function foo() { }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go new file mode 100644 index 00000000000..22f93a4e8b1 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go @@ -0,0 +1,83 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "non local change does not start build of referencing projects with circular references", + CommandLineArgs: []string{"--b", "-w", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true + }, + "references": [ + { "path": "../tests", "circular": true } + ], +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Make local change to core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +function foo() { }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go new file mode 100644 index 00000000000..f4d35359857 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go @@ -0,0 +1,107 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "reportErrors when preserveWatchOutput is not used", + CommandLineArgs: []string{"-b", "-w", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "change logic", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/index.ts", `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +let y: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +let x: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error in logic", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/index.ts", `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go new file mode 100644 index 00000000000..8f1396bdcbd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go @@ -0,0 +1,107 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "reportErrors when preserveWatchOutput is passed on command line", + CommandLineArgs: []string{"-b", "-w", "tests", "--preserveWatchOutput"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "change logic", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/index.ts", `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +let y: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change core", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +let x: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error in logic", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/index.ts", `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go new file mode 100644 index 00000000000..c5dc3b9d4a7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go @@ -0,0 +1,108 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "reportErrors when stopBuildOnErrors is passed on command line", + CommandLineArgs: []string{"-b", "-w", "tests", "--stopBuildOnErrors"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "change logic", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/index.ts", `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +let y: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change core", + ExpectedDiff: "Clean build will stop on error in core and will not report error in logic\nWatch build will retain previous errors from logic and report it", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +let x: string = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error in logic", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/index.ts", `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go new file mode 100644 index 00000000000..bfd3ee9b493 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go @@ -0,0 +1,87 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "should not trigger recompilation because of program emit", + CommandLineArgs: []string{"--b", "-w", "core", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add new file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/file3.ts", "export const y = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go new file mode 100644 index 00000000000..4b6aaaa5d92 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go @@ -0,0 +1,85 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "should not trigger recompilation because of program emit with outDir specified", + CommandLineArgs: []string{"--b", "-w", "core", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "outDir" + } +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add new file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/file3.ts", "export const y = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go new file mode 100644 index 00000000000..a78978e07a0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go @@ -0,0 +1,81 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors", + CommandLineArgs: []string{"--b", "tests", "--verbose", "--stopBuildOnErrors", "--watch"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }multiply();`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go new file mode 100644 index 00000000000..8939b49f811 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go @@ -0,0 +1,80 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors when test does not reference core", + CommandLineArgs: []string{"--b", "tests", "--verbose", "--stopBuildOnErrors", "--watch"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }multiply();`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go new file mode 100644 index 00000000000..2c0dea3438e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go @@ -0,0 +1,78 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuildWatch_sample_watches_config_files_that_are_not_present(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "watches config files that are not present", + CommandLineArgs: []string{"--b", "-w", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Write logic", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/tsconfig.json", `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_clean_file_name_and_output_name_clashing_test.go b/internal/execute/tsctests/tests/Test_tsbuild_clean_file_name_and_output_name_clashing_test.go new file mode 100644 index 00000000000..46b36b7b881 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_clean_file_name_and_output_name_clashing_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_clean_file_name_and_output_name_clashing(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "clean", + SubScenario: "file name and output name clashing", + CommandLineArgs: []string{"--b", "--clean"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/bar.ts": "", + "/home/src/workspaces/solution/index.js": "", + "/home/src/workspaces/solution/tsconfig.json": `{ + "compilerOptions": { "allowJs": true } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_clean_tsx_with_dts_emit_test.go b/internal/execute/tsctests/tests/Test_tsbuild_clean_tsx_with_dts_emit_test.go new file mode 100644 index 00000000000..afec0e0b53c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_clean_tsx_with_dts_emit_test.go @@ -0,0 +1,36 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_clean_tsx_with_dts_emit(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "clean", + SubScenario: "tsx with dts emit", + CommandLineArgs: []string{"--b", "project", "-v", "--explainFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/main.tsx": "export const x = 10;", + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { "declaration": true }, + "include": ["src/**/*.tsx", "src/**/*.ts"] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "clean build", + CommandLineArgs: []string{"-b", "project", "--clean"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_bad_locale_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_bad_locale_test.go new file mode 100644 index 00000000000..38229b1344c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_bad_locale_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_bad_locale(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "bad locale", + CommandLineArgs: []string{"--build", "--help", "--locale", "whoops"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_test.go new file mode 100644 index 00000000000..11afa2d43ad --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_test.go @@ -0,0 +1,88 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_different_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "different options", + CommandLineArgs: []string{"--build", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/project/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/project/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/project/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "with sourceMap", + CommandLineArgs: []string{"--build", "--verbose", "--sourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "should re-emit only js so they dont contain sourcemap", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration should not emit anything", + CommandLineArgs: []string{"--build", "--verbose", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap", + CommandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "should re-emit only dts so they dont contain sourcemap", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with emitDeclarationOnly should not emit anything", + CommandLineArgs: []string{"--build", "--verbose", "--emitDeclarationOnly"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = 10;const aLocal = 100;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration should not emit anything", + CommandLineArgs: []string{"--build", "--verbose", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with inlineSourceMap", + CommandLineArgs: []string{"--build", "--verbose", "--inlineSourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with sourceMap", + CommandLineArgs: []string{"--build", "--verbose", "--sourceMap"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_with_incremental_test.go new file mode 100644 index 00000000000..9ebd7cc4637 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_with_incremental_test.go @@ -0,0 +1,93 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_different_options_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "different options with incremental", + CommandLineArgs: []string{"--build", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/project/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/project/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/project/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "with sourceMap", + CommandLineArgs: []string{"--build", "--verbose", "--sourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "should re-emit only js so they dont contain sourcemap", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration, emit Dts and should not emit js", + CommandLineArgs: []string{"--build", "--verbose", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap", + CommandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = 10;const aLocal = 100;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap", + CommandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with inlineSourceMap", + CommandLineArgs: []string{"--build", "--verbose", "--inlineSourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with sourceMap", + CommandLineArgs: []string{"--build", "--verbose", "--sourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit js files", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap", + CommandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap, should not re-emit", + CommandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go new file mode 100644 index 00000000000..c940c44c2e4 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "emitDeclarationOnly false on commandline", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project1/src/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/solution/project1/src/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/solution/project1/src/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/solution/project1/src/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/solution/project1/src/tsconfig.json": `{ + "compilerOptions": { "composite": true, "emitDeclarationOnly": true } +}`, + "/home/src/workspaces/solution/project2/src/e.ts": "export const e = 10;", + "/home/src/workspaces/solution/project2/src/f.ts": "import { a } from \"../../project1/src/a\"; export const f = a;", + "/home/src/workspaces/solution/project2/src/g.ts": "import { b } from \"../../project1/src/b\"; export const g = b;", + "/home/src/workspaces/solution/project2/src/tsconfig.json": `{ + "compilerOptions": { "composite": true, "emitDeclarationOnly": true }, + "references": [{ "path": "../../project1/src" }] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/a.ts", "export const a = 10;const aLocal = 10;const aa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit js files", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change run with js emit", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "js emit with change", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const blocal = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go new file mode 100644 index 00000000000..234325e71e1 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "emitDeclarationOnly false on commandline with declaration and incremental", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project1/src/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/solution/project1/src/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/solution/project1/src/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/solution/project1/src/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/solution/project1/src/tsconfig.json": `{ + "compilerOptions": { "incremental": true, "declaration": true, "emitDeclarationOnly": true } +}`, + "/home/src/workspaces/solution/project2/src/e.ts": "export const e = 10;", + "/home/src/workspaces/solution/project2/src/f.ts": "import { a } from \"../../project1/src/a\"; export const f = a;", + "/home/src/workspaces/solution/project2/src/g.ts": "import { b } from \"../../project1/src/b\"; export const g = b;", + "/home/src/workspaces/solution/project2/src/tsconfig.json": `{ + "compilerOptions": { "incremental": true, "declaration": true, "emitDeclarationOnly": true }, + "references": [{ "path": "../../project1/src" }] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/a.ts", "export const a = 10;const aLocal = 10;const aa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit js files", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change run with js emit", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "js emit with change", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const blocal = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go new file mode 100644 index 00000000000..cab8cacfe5e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "emitDeclarationOnly false on commandline with declaration", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project1/src/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/solution/project1/src/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/solution/project1/src/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/solution/project1/src/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/solution/project1/src/tsconfig.json": `{ + "compilerOptions": { "declaration": true, "emitDeclarationOnly": true } +}`, + "/home/src/workspaces/solution/project2/src/e.ts": "export const e = 10;", + "/home/src/workspaces/solution/project2/src/f.ts": "import { a } from \"../../project1/src/a\"; export const f = a;", + "/home/src/workspaces/solution/project2/src/g.ts": "import { b } from \"../../project1/src/b\"; export const g = b;", + "/home/src/workspaces/solution/project2/src/tsconfig.json": `{ + "compilerOptions": { "declaration": true, "emitDeclarationOnly": true }, + "references": [{ "path": "../../project1/src" }] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/a.ts", "export const a = 10;const aLocal = 10;const aa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit js files", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change run with js emit", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "js emit with change", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const blocal = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go new file mode 100644 index 00000000000..f4c34417033 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go @@ -0,0 +1,93 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "emitDeclarationOnly on commandline", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project1/src/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/solution/project1/src/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/solution/project1/src/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/solution/project1/src/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/solution/project1/src/tsconfig.json": `{ + "compilerOptions": { "composite": true } +}`, + "/home/src/workspaces/solution/project2/src/e.ts": "export const e = 10;", + "/home/src/workspaces/solution/project2/src/f.ts": "import { a } from \"../../project1/src/a\"; export const f = a;", + "/home/src/workspaces/solution/project2/src/g.ts": "import { b } from \"../../project1/src/b\"; export const g = b;", + "/home/src/workspaces/solution/project2/src/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../../project1/src" }] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/a.ts", "export const a = 10;const aLocal = 10;const aa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "non local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/a.ts", "export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit js files", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "js emit with change without emitDeclarationOnly", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "non local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "js emit with change without emitDeclarationOnly", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go new file mode 100644 index 00000000000..8ab262bcd7f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go @@ -0,0 +1,93 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "emitDeclarationOnly on commandline with declaration and incremental", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project1/src/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/solution/project1/src/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/solution/project1/src/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/solution/project1/src/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/solution/project1/src/tsconfig.json": `{ + "compilerOptions": { "incremental": true, "declaration": true } +}`, + "/home/src/workspaces/solution/project2/src/e.ts": "export const e = 10;", + "/home/src/workspaces/solution/project2/src/f.ts": "import { a } from \"../../project1/src/a\"; export const f = a;", + "/home/src/workspaces/solution/project2/src/g.ts": "import { b } from \"../../project1/src/b\"; export const g = b;", + "/home/src/workspaces/solution/project2/src/tsconfig.json": `{ + "compilerOptions": { "incremental": true, "declaration": true }, + "references": [{ "path": "../../project1/src" }] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/a.ts", "export const a = 10;const aLocal = 10;const aa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "non local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/a.ts", "export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit js files", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "js emit with change without emitDeclarationOnly", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "non local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "js emit with change without emitDeclarationOnly", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go new file mode 100644 index 00000000000..e4a0872a3fd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go @@ -0,0 +1,93 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "emitDeclarationOnly on commandline with declaration", + CommandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project1/src/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/solution/project1/src/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/solution/project1/src/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/solution/project1/src/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/solution/project1/src/tsconfig.json": `{ + "compilerOptions": { "declaration": true } +}`, + "/home/src/workspaces/solution/project2/src/e.ts": "export const e = 10;", + "/home/src/workspaces/solution/project2/src/f.ts": "import { a } from \"../../project1/src/a\"; export const f = a;", + "/home/src/workspaces/solution/project2/src/g.ts": "import { b } from \"../../project1/src/b\"; export const g = b;", + "/home/src/workspaces/solution/project2/src/tsconfig.json": `{ + "compilerOptions": { "declaration": true }, + "references": [{ "path": "../../project1/src" }] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/a.ts", "export const a = 10;const aLocal = 10;const aa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "non local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/a.ts", "export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit js files", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "js emit with change without emitDeclarationOnly", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "non local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "js emit with change without emitDeclarationOnly", + CommandLineArgs: []string{"--b", "project2/src", "--verbose"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project1/src/b.ts", "export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_help_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_help_test.go new file mode 100644 index 00000000000..aa7d8b85e0f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_help_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_help(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "help", + CommandLineArgs: []string{"--build", "--help"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_locale_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_locale_test.go new file mode 100644 index 00000000000..ee1d259b4f6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_locale_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_locale(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "locale", + CommandLineArgs: []string{"--build", "--help", "--locale", "en"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_when_build_not_first_argument_test.go b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_when_build_not_first_argument_test.go new file mode 100644 index 00000000000..04d7f90dc2e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_commandLine_when_build_not_first_argument_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_commandLine_when_build_not_first_argument(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "when build not first argument", + CommandLineArgs: []string{"--verbose", "--build"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_missing_config_file_test.go b/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_missing_config_file_test.go new file mode 100644 index 00000000000..3c97bba5856 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_missing_config_file_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_configFileErrors_missing_config_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "configFileErrors", + SubScenario: "missing config file", + CommandLineArgs: []string{"--b", "bogus.json"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go b/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go new file mode 100644 index 00000000000..8e5efffa823 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go @@ -0,0 +1,73 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "configFileErrors", + SubScenario: "reports syntax errors in config file", + CommandLineArgs: []string{"--b"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export function foo() { }", + "/home/src/workspaces/project/b.ts": "export function bar() { }", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, + "files": [ + "a.ts" + "b.ts" + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "reports syntax errors after change to config file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "composite": true, "declaration": true + }, + "files": [ + "a.ts" + "b.ts" + ] +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "reports syntax errors after change to ts file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export function foo() { }export function fooBar() { }") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "builds after fixing config file errors", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "composite": true, "declaration": true + }, + "files": [ + "a.ts", + "b.ts" + ] +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go b/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go new file mode 100644 index 00000000000..e2ef65a1764 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go @@ -0,0 +1,42 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "configFileErrors", + SubScenario: "when tsconfig extends the missing file", + CommandLineArgs: []string{"--b"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/tsconfig.first.json": `{ + "extends": "./foobar.json", + "compilerOptions": { + "composite": true + } +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./tsconfig.first.json" }, + { "path": "./tsconfig.second.json" } + ] +}`, + "/home/src/workspaces/project/tsconfig.second.json": `{ + "extends": "./foobar.json", + "compilerOptions": { + "composite": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_test.go new file mode 100644 index 00000000000..d4520be0a71 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_test.go @@ -0,0 +1,51 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_declarationEmit_reports_dts_generation_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "reports dts generation errors", + CommandLineArgs: []string{"-b", "--explainFiles", "--listEmittedFiles", "--v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": `import ky from 'ky'; +export const api = ky.extend({});`, + "/home/src/workspaces/project/node_modules/ky/distribution/index.d.ts": `type KyInstance = { + extend(options: Record): KyInstance; +} +declare const ky: KyInstance; +export default ky;`, + "/home/src/workspaces/project/node_modules/ky/package.json": `{ + "name": "ky", + "type": "module", + "main": "./distribution/index.js" +}`, + "/home/src/workspaces/project/package.json": `{ + "type": "module" +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "composite": false, + "incremental": false, + "declaration": true, + "skipLibCheck": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go new file mode 100644 index 00000000000..b5587af7c06 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go @@ -0,0 +1,51 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "reports dts generation errors with incremental", + CommandLineArgs: []string{"-b", "--explainFiles", "--listEmittedFiles", "--v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": `import ky from 'ky'; +export const api = ky.extend({});`, + "/home/src/workspaces/project/node_modules/ky/distribution/index.d.ts": `type KyInstance = { + extend(options: Record): KyInstance; +} +declare const ky: KyInstance; +export default ky;`, + "/home/src/workspaces/project/node_modules/ky/package.json": `{ + "name": "ky", + "type": "module", + "main": "./distribution/index.js" +}`, + "/home/src/workspaces/project/package.json": `{ + "type": "module" +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "composite": false, + "incremental": true, + "declaration": true, + "skipLibCheck": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go new file mode 100644 index 00000000000..113d4d26525 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "when declaration file is referenced through triple slash but uses no references", + CommandLineArgs: []string{"--b", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/src/common/nominal.ts": `/// +export declare type Nominal = MyNominal;`, + "/home/src/workspaces/solution/src/common/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "include": ["./nominal.ts"], +}`, + "/home/src/workspaces/solution/src/common/types.d.ts": `declare type MyNominal = T & { + specialKey: Name; +};`, + "/home/src/workspaces/solution/src/subProject/index.ts": `import { Nominal } from '../common/nominal'; +export type MyNominal = Nominal;`, + "/home/src/workspaces/solution/src/subProject/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../common" }], + "include": ["./index.ts"], +}`, + "/home/src/workspaces/solution/src/subProject2/index.ts": `import { MyNominal } from '../subProject/index'; +const variable = { + key: 'value' as MyNominal, +}; +export function getVar(): keyof typeof variable { + return 'key'; +}`, + "/home/src/workspaces/solution/src/subProject2/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../subProject" }], + "include": ["./index.ts"], +}`, + "/home/src/workspaces/solution/src/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "./subProject" }, { "path": "./subProject2" }], + "include": [], +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "rootDir": "./", + "outDir": "lib", + }, +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "extends": "./tsconfig.base.json", + "compilerOptions": { "composite": true }, + "include": ["./src/**/*.ts"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go new file mode 100644 index 00000000000..c7d95439217 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "when declaration file is referenced through triple slash", + CommandLineArgs: []string{"--b", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/src/common/nominal.ts": `/// +export declare type Nominal = MyNominal;`, + "/home/src/workspaces/solution/src/common/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "include": ["./nominal.ts"], +}`, + "/home/src/workspaces/solution/src/common/types.d.ts": `declare type MyNominal = T & { + specialKey: Name; +};`, + "/home/src/workspaces/solution/src/subProject/index.ts": `import { Nominal } from '../common/nominal'; +export type MyNominal = Nominal;`, + "/home/src/workspaces/solution/src/subProject/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../common" }], + "include": ["./index.ts"], +}`, + "/home/src/workspaces/solution/src/subProject2/index.ts": `import { MyNominal } from '../subProject/index'; +const variable = { + key: 'value' as MyNominal, +}; +export function getVar(): keyof typeof variable { + return 'key'; +}`, + "/home/src/workspaces/solution/src/subProject2/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../subProject" }], + "include": ["./index.ts"], +}`, + "/home/src/workspaces/solution/src/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "./subProject" }, { "path": "./subProject2" }], + "include": [], +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "rootDir": "./", + "outDir": "lib", + }, +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "./src" }], + "include": [], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go new file mode 100644 index 00000000000..e9c37b36514 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go @@ -0,0 +1,49 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "when declaration file used inferred type from referenced project", + CommandLineArgs: []string{"--b", "packages/pkg2/tsconfig.json", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/packages/pkg1/src/index.ts": `export interface IThing { + a: string; +} +export interface IThings { + thing1: IThing; +}`, + "/home/src/workspaces/project/packages/pkg1/tsconfig.json": `{ + "extends": "../../tsconfig", + "compilerOptions": { "outDir": "lib" }, + "include": ["src"], +}`, + "/home/src/workspaces/project/packages/pkg2/src/index.ts": `import { IThings } from '@fluentui/pkg1'; +export function fn4() { + const a: IThings = { thing1: { a: 'b' } }; + return a.thing1; +}`, + "/home/src/workspaces/project/packages/pkg2/tsconfig.json": `{ + "extends": "../../tsconfig", + "compilerOptions": { "outDir": "lib" }, + "include": ["src"], + "references": [{ "path": "../pkg1" }], +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "paths": { "@fluentui/*": ["./packages/*/src"] }, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go b/internal/execute/tsctests/tests/Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go new file mode 100644 index 00000000000..c7efbb83fdd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go @@ -0,0 +1,104 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "demo", + SubScenario: "in bad-ref branch reports the error about files not in rootDir at the import location", + CommandLineArgs: []string{"--b", "--verbose"}, + Cwd: "/user/username/projects/demo", + Files: tsctests.FileMap{ + "/user/username/projects/demo/animals/animal.ts": `export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +}`, + "/user/username/projects/demo/animals/dog.ts": "import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "/user/username/projects/demo/animals/index.ts": `import Animal from './animal'; + +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog };`, + "/user/username/projects/demo/animals/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [ + { "path": "../core" } + ] +}`, + "/user/username/projects/demo/core/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, +}`, + "/user/username/projects/demo/core/utilities.ts": `import * as A from '../animals' +export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +}`, + "/user/username/projects/demo/tsconfig-base.json": `{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + }, +}`, + "/user/username/projects/demo/tsconfig.json": `{ + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals", + }, + { + "path": "./zoo", + }, + ], +}`, + "/user/username/projects/demo/zoo/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] +}`, + "/user/username/projects/demo/zoo/zoo.ts": `import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go b/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go new file mode 100644 index 00000000000..56ff40d924a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go @@ -0,0 +1,108 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "demo", + SubScenario: "in circular branch reports the error about it by stopping build", + CommandLineArgs: []string{"--b", "--verbose"}, + Cwd: "/user/username/projects/demo", + Files: tsctests.FileMap{ + "/user/username/projects/demo/animals/animal.ts": `export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +}`, + "/user/username/projects/demo/animals/dog.ts": "import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "/user/username/projects/demo/animals/index.ts": `import Animal from './animal'; + +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog };`, + "/user/username/projects/demo/animals/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [ + { "path": "../core" } + ] +}`, + "/user/username/projects/demo/core/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, + "references": [ + { + "path": "../zoo", + } + ] +}`, + "/user/username/projects/demo/core/utilities.ts": `export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +}`, + "/user/username/projects/demo/tsconfig-base.json": `{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + }, +}`, + "/user/username/projects/demo/tsconfig.json": `{ + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals", + }, + { + "path": "./zoo", + }, + ], +}`, + "/user/username/projects/demo/zoo/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] +}`, + "/user/username/projects/demo/zoo/zoo.ts": `import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_is_set_in_the_reference_test.go b/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_is_set_in_the_reference_test.go new file mode 100644 index 00000000000..86cee8a1d96 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_is_set_in_the_reference_test.go @@ -0,0 +1,136 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_demo_in_circular_is_set_in_the_reference(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "demo", + SubScenario: "in circular is set in the reference", + CommandLineArgs: []string{"--b", "--verbose"}, + Cwd: "/user/username/projects/demo", + Files: tsctests.FileMap{ + "/user/username/projects/demo/a/index.ts": "export const a = 10;", + "/user/username/projects/demo/a/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/a", + "rootDir": "." + }, + "references": [ + { + "path": "../b", + "circular": true + } + ] +}`, + "/user/username/projects/demo/animals/animal.ts": `export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +}`, + "/user/username/projects/demo/animals/dog.ts": "import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "/user/username/projects/demo/animals/index.ts": `import Animal from './animal'; + +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog };`, + "/user/username/projects/demo/animals/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [ + { "path": "../core" } + ] +}`, + "/user/username/projects/demo/b/index.ts": "export const b = 10;", + "/user/username/projects/demo/b/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/b", + "rootDir": "." + }, + "references": [ + { + "path": "../a", + } + ] +}`, + "/user/username/projects/demo/core/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, +}`, + "/user/username/projects/demo/core/utilities.ts": `export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +}`, + "/user/username/projects/demo/tsconfig-base.json": `{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + }, +}`, + "/user/username/projects/demo/tsconfig.json": `{ + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals", + }, + { + "path": "./zoo", + }, + { + "path": "./a", + }, + { + "path": "./b", + }, + ], +}`, + "/user/username/projects/demo/zoo/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] +}`, + "/user/username/projects/demo/zoo/zoo.ts": `import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go b/internal/execute/tsctests/tests/Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go new file mode 100644 index 00000000000..e2c20421c33 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go @@ -0,0 +1,107 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "demo", + SubScenario: "in master branch with everything setup correctly and reports no error", + CommandLineArgs: []string{"--b", "--verbose"}, + Cwd: "/user/username/projects/demo", + Files: tsctests.FileMap{ + "/user/username/projects/demo/animals/animal.ts": `export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +}`, + "/user/username/projects/demo/animals/dog.ts": "import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "/user/username/projects/demo/animals/index.ts": `import Animal from './animal'; + +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog };`, + "/user/username/projects/demo/animals/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [ + { "path": "../core" } + ] +}`, + "/user/username/projects/demo/core/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, +}`, + "/user/username/projects/demo/core/utilities.ts": `export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +}`, + "/user/username/projects/demo/tsconfig-base.json": `{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + }, +}`, + "/user/username/projects/demo/tsconfig.json": `{ + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals", + }, + { + "path": "./zoo", + }, + ], +}`, + "/user/username/projects/demo/zoo/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] +}`, + "/user/username/projects/demo/zoo/zoo.ts": `import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go b/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go new file mode 100644 index 00000000000..b6705af1abe --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go @@ -0,0 +1,67 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "emitDeclarationOnly", + SubScenario: "only dts output in circular import project with emitDeclarationOnly and declarationMap", + CommandLineArgs: []string{"--b", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/a.ts": `import { B } from "./b"; + +export interface A { + b: B; +}`, + "/home/src/workspaces/project/src/b.ts": `import { C } from "./c"; + +export interface B { + b: C; +}`, + "/home/src/workspaces/project/src/c.ts": `import { A } from "./a"; + +export interface C { + a: A; +}`, + "/home/src/workspaces/project/src/index.ts": `export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c";`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "target": "es5", + "module": "commonjs", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "src", + "emitDeclarationOnly": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/a.ts", `import { B } from "./b"; + +export interface A { + b: B; foo: any; +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go new file mode 100644 index 00000000000..ad2e4f5fd7e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go @@ -0,0 +1,67 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "emitDeclarationOnly", + SubScenario: "only dts output in circular import project with emitDeclarationOnly", + CommandLineArgs: []string{"--b", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/a.ts": `import { B } from "./b"; + +export interface A { + b: B; +}`, + "/home/src/workspaces/project/src/b.ts": `import { C } from "./c"; + +export interface B { + b: C; +}`, + "/home/src/workspaces/project/src/c.ts": `import { A } from "./a"; + +export interface C { + a: A; +}`, + "/home/src/workspaces/project/src/index.ts": `export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c";`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "target": "es5", + "module": "commonjs", + "declaration": true, + "declarationMap": false, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "src", + "emitDeclarationOnly": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/a.ts", `import { B } from "./b"; + +export interface A { + b: B; foo: any; +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go new file mode 100644 index 00000000000..1a263e1697f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go @@ -0,0 +1,77 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "emitDeclarationOnly", + SubScenario: "only dts output in non circular imports project with emitDeclarationOnly", + CommandLineArgs: []string{"--b", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/a.ts": `export class B { prop = "hello"; } + +export interface A { + b: B; +}`, + "/home/src/workspaces/project/src/b.ts": `import { C } from "./c"; + +export interface B { + b: C; +}`, + "/home/src/workspaces/project/src/c.ts": `import { A } from "./a"; + +export interface C { + a: A; +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "target": "es5", + "module": "commonjs", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "src", + "emitDeclarationOnly": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-doesnt-change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/a.ts", `export class B { prop = "hello"; } + +class C { } +export interface A { + b: B; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/a.ts", `export class B { prop = "hello"; } + +class C { } +export interface A { + b: B; foo: any; +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_extends_configDir_template_test.go b/internal/execute/tsctests/tests/Test_tsbuild_extends_configDir_template_test.go new file mode 100644 index 00000000000..2566625454c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_extends_configDir_template_test.go @@ -0,0 +1,54 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_extends_configDir_template(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "extends", + SubScenario: "configDir template", + CommandLineArgs: []string{"--b", "--explainFiles", "--v"}, + Cwd: "/home/src/projects/myproject", + Files: tsctests.FileMap{ + "/home/src/projects/configs/first/tsconfig.json": `{ + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["root1", "${configDir}/root2", "root3"], + "types": [], + }, +}`, + "/home/src/projects/configs/second/tsconfig.json": `{ + "files": ["${configDir}/main.ts"], + "compilerOptions": { + "declarationDir": "${configDir}/decls", + "paths": { + "@myscope/*": ["${configDir}/types/*"], + }, + }, + "watchOptions": { + "excludeFiles": ["${configDir}/main.ts"], + }, +}`, + "/home/src/projects/myproject/main.ts": `// some comment +export const y = 10; +import { x } from "@myscope/sometype";`, + "/home/src/projects/myproject/tsconfig.json": `{ + "extends": "../configs/first/tsconfig.json", + "compilerOptions": { + "declaration": true, + "outDir": "outDir", + "traceResolution": true, + }, +}`, + "/home/src/projects/myproject/types/sometype.ts": "export const x = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_extends_resolves_the_symlink_path_test.go b/internal/execute/tsctests/tests/Test_tsbuild_extends_resolves_the_symlink_path_test.go new file mode 100644 index 00000000000..fc9030245b1 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_extends_resolves_the_symlink_path_test.go @@ -0,0 +1,38 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuild_extends_resolves_the_symlink_path(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "extends", + SubScenario: "resolves the symlink path", + CommandLineArgs: []string{"-b", "src", "--extendedDiagnostics"}, + Cwd: "/users/user/projects/myproject", + Files: tsctests.FileMap{ + "/users/user/projects/myconfigs/node_modules/@something/tsconfig-base/tsconfig.json": `{ + "compilerOptions": { "composite": true } +}`, + "/users/user/projects/myconfigs/node_modules/@something/tsconfig-node/tsconfig.json": `{ + "extends": "@something/tsconfig-base/tsconfig.json", + "compilerOptions": { + "removeComments": true + } +}`, + "/users/user/projects/myproject/node_modules/@something/tsconfig-node": vfstest.Symlink("/users/user/projects/myconfigs/node_modules/@something/tsconfig-node"), + "/users/user/projects/myproject/src/index.ts": `// some comment +export const x = 10;`, + "/users/user/projects/myproject/src/tsconfig.json": `{ + "extends": "@something/tsconfig-node/tsconfig.json" +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go b/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go new file mode 100644 index 00000000000..0fe0a058815 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go @@ -0,0 +1,54 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "extends", + SubScenario: "when building project uses reference and both extend config with include", + CommandLineArgs: []string{"--b", "webpack/tsconfig.json", "--v", "--listFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/shared/index.ts": "export const a: Unrestricted = 1;", + "/home/src/workspaces/solution/shared/tsconfig-base.json": `{ + "include": ["./typings-base/"], +}`, + "/home/src/workspaces/solution/shared/tsconfig.json": `{ + "extends": "./tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], +}`, + "/home/src/workspaces/solution/shared/typings-base/globals.d.ts": "type Unrestricted = any;", + "/home/src/workspaces/solution/tsconfig.json": `{ + "references": [ + { "path": "./shared/tsconfig.json" }, + { "path": "./webpack/tsconfig.json" }, + ], + "files": [], +}`, + "/home/src/workspaces/solution/webpack/index.ts": "export const b: Unrestricted = 1;", + "/home/src/workspaces/solution/webpack/tsconfig.json": `{ + "extends": "../shared/tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], + "references": [{ "path": "../shared/tsconfig.json" }], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go b/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go new file mode 100644 index 00000000000..26bdc33dc1a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go @@ -0,0 +1,54 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "extends", + SubScenario: "when building solution with projects extends config with include", + CommandLineArgs: []string{"--b", "--v", "--listFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/shared/index.ts": "export const a: Unrestricted = 1;", + "/home/src/workspaces/solution/shared/tsconfig-base.json": `{ + "include": ["./typings-base/"], +}`, + "/home/src/workspaces/solution/shared/tsconfig.json": `{ + "extends": "./tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], +}`, + "/home/src/workspaces/solution/shared/typings-base/globals.d.ts": "type Unrestricted = any;", + "/home/src/workspaces/solution/tsconfig.json": `{ + "references": [ + { "path": "./shared/tsconfig.json" }, + { "path": "./webpack/tsconfig.json" }, + ], + "files": [], +}`, + "/home/src/workspaces/solution/webpack/index.ts": "export const b: Unrestricted = 1;", + "/home/src/workspaces/solution/webpack/tsconfig.json": `{ + "extends": "../shared/tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], + "references": [{ "path": "../shared/tsconfig.json" }], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_deleted_file_without_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_deleted_file_without_composite_test.go new file mode 100644 index 00000000000..97f13cb10ae --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_deleted_file_without_composite_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_fileDelete_deleted_file_without_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "fileDelete", + SubScenario: "deleted file without composite", + CommandLineArgs: []string{"--b", "child/tsconfig.json", "-v", "--traceResolution", "--explainFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/child/child.ts": `import { child2 } from "../child/child2"; +export function child() { + child2(); +}`, + "/home/src/workspaces/solution/child/child2.ts": `export function child2() { +}`, + "/home/src/workspaces/solution/child/tsconfig.json": `{ + "compilerOptions": { } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete child2 file", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/solution/child/child2.js") + sys.Remove("/home/src/workspaces/solution/child/child2.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_detects_deleted_file_test.go b/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_detects_deleted_file_test.go new file mode 100644 index 00000000000..d066153e5fd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_detects_deleted_file_test.go @@ -0,0 +1,48 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_fileDelete_detects_deleted_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "fileDelete", + SubScenario: "detects deleted file", + CommandLineArgs: []string{"--b", "main/tsconfig.json", "-v", "--traceResolution", "--explainFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/child/child.ts": `import { child2 } from "../child/child2"; +export function child() { + child2(); +}`, + "/home/src/workspaces/solution/child/child2.ts": `export function child2() { +}`, + "/home/src/workspaces/solution/child/tsconfig.json": `{ + "compilerOptions": { "composite": true } +}`, + "/home/src/workspaces/solution/main/main.ts": `import { child } from "../child/child"; +export function main() { + child(); +}`, + "/home/src/workspaces/solution/main/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../child" }], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete child2 file", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/solution/child/child2.d.ts") + sys.Remove("/home/src/workspaces/solution/child/child2.js") + sys.Remove("/home/src/workspaces/solution/child/child2.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go b/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go new file mode 100644 index 00000000000..3e24d993ac7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go @@ -0,0 +1,137 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "inferredTypeFromMonorepoReference", + SubScenario: "inferred type from referenced project that references another project in monorepo", + CommandLineArgs: []string{"--b", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/node_modules/package-a": vfstest.Symlink("/home/src/workspaces/solution/packages/package-a"), + "/home/src/workspaces/solution/node_modules/package-b": vfstest.Symlink("/home/src/workspaces/solution/packages/package-b"), + "/home/src/workspaces/solution/node_modules/package-c": vfstest.Symlink("/home/src/workspaces/solution/packages/package-c"), + "/home/src/workspaces/solution/package.json": `{ + "name": "tsgo-monorepo-issue", + "private": true, + "workspaces": ["packages/*"] +}`, + "/home/src/workspaces/solution/packages/package-a/package.json": `{ + "name": "package-a", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts", + "exports": { + ".": "./src/index.ts" + }, + "dependencies": { + "package-b": "workspace:*" + } +}`, + "/home/src/workspaces/solution/packages/package-a/src/index.ts": `import { createThing } from "package-b"; + +class MyClass { + public thing = createThing({ id: "1", name: "test", enabled: true }); +} + +export { MyClass };`, + "/home/src/workspaces/solution/packages/package-a/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "module": "ESNext", + "moduleResolution": "Bundler", + "target": "ES2022", + "outDir": "./out", + "rootDir": "./src" + }, + "include": ["src/**/*"], + "references": [{ "path": "../package-b" }] +}`, + "/home/src/workspaces/solution/packages/package-b/package.json": `{ + "name": "package-b", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts", + "exports": { + ".": "./src/index.ts" + }, + "dependencies": { + "package-c": "workspace:*" + } +}`, + "/home/src/workspaces/solution/packages/package-b/src/index.ts": `import type { MyType } from "package-c"; + +export function createThing(input: MyType): MyType { + return { ...input }; +}`, + "/home/src/workspaces/solution/packages/package-b/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "module": "ESNext", + "moduleResolution": "Bundler", + "target": "ES2022", + "outDir": "./out", + "rootDir": "./src" + }, + "include": ["src/**/*"], + "references": [{ "path": "../package-c" }] +}`, + "/home/src/workspaces/solution/packages/package-c/package.json": `{ + "name": "package-c", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts", + "exports": { + ".": "./src/index.ts" + } +}`, + "/home/src/workspaces/solution/packages/package-c/src/index.ts": `export interface MyType { + id: string; + name: string; + enabled: boolean; +}`, + "/home/src/workspaces/solution/packages/package-c/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "module": "ESNext", + "moduleResolution": "Bundler", + "target": "ES2022", + "outDir": "./out", + "rootDir": "./src" + }, + "include": ["src/**/*"] +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "files": [], + "include": [], + "references": [ + { "path": "packages/package-a" }, + { "path": "packages/package-b" }, + { "path": "packages/package-c" } + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go b/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go new file mode 100644 index 00000000000..c0b62ad9f2f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go @@ -0,0 +1,92 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "inferredTypeFromTransitiveModule", + SubScenario: "inferred type from transitive module", + CommandLineArgs: []string{"--b", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/bar.ts": `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(param: string): void { +});`, + "/home/src/workspaces/project/bundling.ts": `export class LazyModule { + constructor(private importCallback: () => Promise) {} +} + +export class LazyAction< + TAction extends (...args: any[]) => any, + TModule +> { + constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) { + } +}`, + "/home/src/workspaces/project/global.d.ts": `interface PromiseConstructor { + new (): Promise; +} +declare var Promise: PromiseConstructor; +interface Promise { +}`, + "/home/src/workspaces/project/index.ts": `import { LazyAction, LazyModule } from './bundling'; +const lazyModule = new LazyModule(() => + import('./lazyIndex') +); +export const lazyBar = new LazyAction(lazyModule, m => m.bar);`, + "/home/src/workspaces/project/lazyIndex.ts": "export { default as bar } from './bar';", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "declaration": true, + "outDir": "obj", + "incremental": true, + "isolatedModules": false, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/bar.ts", `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(): void { +});`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/bar.ts", `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(param: string): void { +});`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go b/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go new file mode 100644 index 00000000000..7f232f1b2f2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go @@ -0,0 +1,92 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "inferredTypeFromTransitiveModule", + SubScenario: "inferred type from transitive module with isolatedModules", + CommandLineArgs: []string{"--b", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/bar.ts": `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(param: string): void { +});`, + "/home/src/workspaces/project/bundling.ts": `export class LazyModule { + constructor(private importCallback: () => Promise) {} +} + +export class LazyAction< + TAction extends (...args: any[]) => any, + TModule +> { + constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) { + } +}`, + "/home/src/workspaces/project/global.d.ts": `interface PromiseConstructor { + new (): Promise; +} +declare var Promise: PromiseConstructor; +interface Promise { +}`, + "/home/src/workspaces/project/index.ts": `import { LazyAction, LazyModule } from './bundling'; +const lazyModule = new LazyModule(() => + import('./lazyIndex') +); +export const lazyBar = new LazyAction(lazyModule, m => m.bar);`, + "/home/src/workspaces/project/lazyIndex.ts": "export { default as bar } from './bar';", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "declaration": true, + "outDir": "obj", + "incremental": true, + "isolatedModules": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/bar.ts", `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(): void { +});`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/bar.ts", `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(param: string): void { +});`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go b/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go new file mode 100644 index 00000000000..18cc1a35d7b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go @@ -0,0 +1,116 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "inferredTypeFromTransitiveModule", + SubScenario: "reports errors in files affected by change in signature with isolatedModules", + CommandLineArgs: []string{"--b", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/bar.ts": `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(param: string): void { +});`, + "/home/src/workspaces/project/bundling.ts": `export class LazyModule { + constructor(private importCallback: () => Promise) {} +} + +export class LazyAction< + TAction extends (...args: any[]) => any, + TModule +> { + constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) { + } +}`, + "/home/src/workspaces/project/global.d.ts": `interface PromiseConstructor { + new (): Promise; +} +declare var Promise: PromiseConstructor; +interface Promise { +}`, + "/home/src/workspaces/project/index.ts": `import { LazyAction, LazyModule } from './bundling'; +const lazyModule = new LazyModule(() => + import('./lazyIndex') +); +export const lazyBar = new LazyAction(lazyModule, m => m.bar);`, + "/home/src/workspaces/project/lazyIndex.ts": `export { default as bar } from './bar';import { default as bar } from './bar'; +bar("hello");`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "declaration": true, + "outDir": "obj", + "incremental": true, + "isolatedModules": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/bar.ts", `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(): void { +});`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/bar.ts", `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(param: string): void { +});`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/bar.ts", `interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(): void { +});`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix Error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/lazyIndex.ts", `export { default as bar } from './bar';import { default as bar } from './bar'; +bar();`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go new file mode 100644 index 00000000000..e4642963ce8 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go @@ -0,0 +1,114 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "javascriptProjectEmit", + SubScenario: "loads js-based projects and emits them correctly", + CommandLineArgs: []string{"--b"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + readonly species: symbol; + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; };`, + "/home/src/workspaces/solution/common/nominal.js": `/** + * @template T, Name + * @typedef {T & {[Symbol.species]: Name}} Nominal + */ +module.exports = {};`, + "/home/src/workspaces/solution/common/tsconfig.json": `{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "composite": true, + }, + "include": ["nominal.js"], +}`, + "/home/src/workspaces/solution/sub-project-2/index.js": `import { MyNominal } from '../sub-project/index'; + +const variable = { + key: /** @type {MyNominal} */('value'), +}; + +/** + * @return {keyof typeof variable} + */ +export function getVar() { + return 'key'; +}`, + "/home/src/workspaces/solution/sub-project-2/tsconfig.json": `{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "../sub-project" }, + ], + "include": ["./index.js"], +}`, + "/home/src/workspaces/solution/sub-project/index.js": `import { Nominal } from '../common/nominal'; + +/** + * @typedef {Nominal} MyNominal + */`, + "/home/src/workspaces/solution/sub-project/tsconfig.json": `{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "../common" }, + ], + "include": ["./index.js"], +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "skipLibCheck": true, + "rootDir": "./", + "outDir": "../lib", + "allowJs": true, + "checkJs": true, + "declaration": true, + }, +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "./sub-project" }, + { "path": "./sub-project-2" }, + ], + "include": [], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go new file mode 100644 index 00000000000..5ca026aa75d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go @@ -0,0 +1,89 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "javascriptProjectEmit", + SubScenario: "loads js-based projects with non-moved json files and emits them correctly", + CommandLineArgs: []string{"-b"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/common/index.ts": `import x = require("./obj.json"); +export = x;`, + "/home/src/workspaces/solution/common/obj.json": `{ + "val": 42, +}`, + "/home/src/workspaces/solution/common/tsconfig.json": `{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": null, + "composite": true, + }, + "include": ["index.ts", "obj.json"], +}`, + "/home/src/workspaces/solution/sub-project-2/index.js": `import { m } from '../sub-project/index'; + +const variable = { + key: m, +}; + +export function getVar() { + return variable; +}`, + "/home/src/workspaces/solution/sub-project-2/tsconfig.json": `{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "../sub-project" }, + ], + "include": ["./index.js"], +}`, + "/home/src/workspaces/solution/sub-project/index.js": `import mod from '../common'; + +export const m = mod;`, + "/home/src/workspaces/solution/sub-project/tsconfig.json": `{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "../common" }, + ], + "include": ["./index.js"], +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "skipLibCheck": true, + "rootDir": "./", + "outDir": "../out", + "allowJs": true, + "checkJs": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "declaration": true, + }, +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "./sub-project" }, + { "path": "./sub-project-2" }, + ], + "include": [], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go b/internal/execute/tsctests/tests/Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go new file mode 100644 index 00000000000..9143a92ef66 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go @@ -0,0 +1,77 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "lateBoundSymbol", + SubScenario: "interface is merged and contains late bound member", + CommandLineArgs: []string{"--b", "--verbose"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/globals.d.ts": `interface SymbolConstructor { + (description?: string | number): symbol; +} +declare var Symbol: SymbolConstructor;`, + "/home/src/workspaces/project/src/hkt.ts": "export interface HKT { }", + "/home/src/workspaces/project/src/main.ts": `import { HKT } from "./hkt"; + +const sym = Symbol(); + +declare module "./hkt" { + interface HKT { + [sym]: { a: T } + } +} +const x = 10; +type A = HKT[typeof sym];`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "rootDir": "src", + "incremental": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-doesnt-change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/main.ts", `import { HKT } from "./hkt"; + +const sym = Symbol(); + +declare module "./hkt" { + interface HKT { + [sym]: { a: T } + } +} + +type A = HKT[typeof sym];`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-doesnt-change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/main.ts", `import { HKT } from "./hkt"; + +const sym = Symbol(); + +declare module "./hkt" { + interface HKT { + [sym]: { a: T } + } +} + +type A = HKT[typeof sym];const x = 10;`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_test.go b/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_test.go new file mode 100644 index 00000000000..176d8620f3c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_test.go @@ -0,0 +1,73 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_libraryResolution_with_config(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "libraryResolution", + SubScenario: "with config", + CommandLineArgs: []string{"-b", "project1", "project2", "project3", "project4", "--verbose", "--explainFiles"}, + Cwd: "/home/src/workspace/projects", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.dom.d.ts": "interface DOMInterface { }", + "/home/src/tslibs/TS/Lib/lib.scripthost.d.ts": "interface ScriptHostInterface { }", + "/home/src/tslibs/TS/Lib/lib.webworker.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/unlreated/index.d.ts": "export const unrelated = 10;", + "/home/src/workspace/projects/project1/core.d.ts": "export const core = 10;", + "/home/src/workspace/projects/project1/file.ts": "export const file = 10;", + "/home/src/workspace/projects/project1/file2.ts": `/// +/// +/// `, + "/home/src/workspace/projects/project1/index.ts": "export const x = \"type1\";", + "/home/src/workspace/projects/project1/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot1"], + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts": "export type TheNum = \"type1\";", + "/home/src/workspace/projects/project1/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project2/index.ts": "export const y = 10", + "/home/src/workspace/projects/project2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project2/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project3/index.ts": "export const z = 10", + "/home/src/workspace/projects/project3/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project3/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project4/index.ts": "export const z = 10", + "/home/src/workspace/projects/project4/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["esnext", "dom", "webworker"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project4/utils.d.ts": "export const y = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_with_libReplacement_test.go b/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_with_libReplacement_test.go new file mode 100644 index 00000000000..6b65a1b226a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_with_libReplacement_test.go @@ -0,0 +1,120 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_libraryResolution_with_config_with_libReplacement(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "libraryResolution", + SubScenario: "with config with libReplacement", + CommandLineArgs: []string{"-b", "project1", "project2", "project3", "project4", "--verbose", "--explainFiles"}, + Cwd: "/home/src/workspace/projects", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.dom.d.ts": "interface DOMInterface { }", + "/home/src/tslibs/TS/Lib/lib.scripthost.d.ts": "interface ScriptHostInterface { }", + "/home/src/tslibs/TS/Lib/lib.webworker.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts": "interface DOMInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; };`, + "/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; };`, + "/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.d.ts": "interface ScriptHostInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/unlreated/index.d.ts": "export const unrelated = 10;", + "/home/src/workspace/projects/project1/core.d.ts": "export const core = 10;", + "/home/src/workspace/projects/project1/file.ts": "export const file = 10;", + "/home/src/workspace/projects/project1/file2.ts": `/// +/// +/// `, + "/home/src/workspace/projects/project1/index.ts": "export const x = \"type1\";", + "/home/src/workspace/projects/project1/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot1"], + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts": "export type TheNum = \"type1\";", + "/home/src/workspace/projects/project1/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project2/index.ts": "export const y = 10", + "/home/src/workspace/projects/project2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project2/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project3/index.ts": "export const z = 10", + "/home/src/workspace/projects/project3/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project3/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project4/index.ts": "export const z = 10", + "/home/src/workspace/projects/project4/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["esnext", "dom", "webworker"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project4/utils.d.ts": "export const y = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go new file mode 100644 index 00000000000..f0292aae262 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go @@ -0,0 +1,48 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "impliedNodeFormat differs between projects for shared file", + CommandLineArgs: []string{"-b", "a", "b", "--verbose", "--traceResolution", "--explainFiles"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a/src/index.ts": "", + "/home/src/workspaces/project/a/tsconfig.json": `{ + "compilerOptions": { + "strict": true + } +}`, + "/home/src/workspaces/project/b/package.json": `{ + "name": "b", + "type": "module" +}`, + "/home/src/workspaces/project/b/src/index.ts": `import pg from "pg"; +pg.foo();`, + "/home/src/workspaces/project/b/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "module": "node16" + }, +}`, + "/home/src/workspaces/project/node_modules/@types/pg/index.d.ts": "export function foo(): void;", + "/home/src/workspaces/project/node_modules/@types/pg/package.json": `{ + "name": "@types/pg", + "types": "index.d.ts" +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go new file mode 100644 index 00000000000..39d44abaa17 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go @@ -0,0 +1,64 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "resolution from d.ts of referenced project", + CommandLineArgs: []string{"--b", "consumer", "--traceResolution", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/common.d.ts": "export type OnValue = (value: number) => void", + "/home/src/workspaces/project/consumer/index.ts": `import { ValueProducerDeclaration, ValueProducerFromTs } from "@producer" +declare let v: ValueProducerDeclaration; +// n is implicitly any because onValue is actually any (despite what the tooltip says) +v.onValue = (n) => { +} +// n is implicitly number as expected +declare let v2: ValueProducerFromTs; +v2.onValue = (n) => { +}`, + "/home/src/workspaces/project/consumer/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "module": "nodenext", + "moduleResolution": "nodenext", + "paths": { + "@producer": ["../producer/index"], + }, + }, + "references": [ + { "path": "../producer" }, + ], +}`, + "/home/src/workspaces/project/producer/in-js.d.ts": `import { OnValue } from "@common" +export interface ValueProducerDeclaration { + onValue: OnValue; +}`, + "/home/src/workspaces/project/producer/index.ts": `export { ValueProducerDeclaration } from "./in-js" +import { OnValue } from "@common" +export interface ValueProducerFromTs { + onValue: OnValue; +}`, + "/home/src/workspaces/project/producer/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "composite": true, + "module": "nodenext", + "moduleResolution": "nodenext", + "paths": { + "@common": ["../common.d.ts"], + }, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go new file mode 100644 index 00000000000..ec5340620b4 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go @@ -0,0 +1,50 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "resolves specifier in output declaration file from referenced project correctly", + CommandLineArgs: []string{"-b", "packages/pkg1", "--verbose", "--traceResolution"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/node_modules/pkg2": vfstest.Symlink("/user/username/projects/myproject/packages/pkg2"), + "/user/username/projects/myproject/packages/pkg1/index.ts": `import type { TheNum } from 'pkg2' +export const theNum: TheNum = 42;`, + "/user/username/projects/myproject/packages/pkg1/tsconfig.json": `{ + "compilerOptions": { + "outDir": "build", + "preserveSymlinks": false + }, + "references": [{ "path": "../pkg2" }] +}`, + "/user/username/projects/myproject/packages/pkg2/const.ts": "export type TheNum = 42;", + "/user/username/projects/myproject/packages/pkg2/index.ts": "export type { TheNum } from 'const';", + "/user/username/projects/myproject/packages/pkg2/package.json": `{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js" +}`, + "/user/username/projects/myproject/packages/pkg2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "build", + "paths": { + "const": ["./const"] + }, + "preserveSymlinks": false, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go new file mode 100644 index 00000000000..1c82fada396 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go @@ -0,0 +1,50 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "resolves specifier in output declaration file from referenced project correctly with preserveSymlinks", + CommandLineArgs: []string{"-b", "packages/pkg1", "--verbose", "--traceResolution"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/node_modules/pkg2": vfstest.Symlink("/user/username/projects/myproject/packages/pkg2"), + "/user/username/projects/myproject/packages/pkg1/index.ts": `import type { TheNum } from 'pkg2' +export const theNum: TheNum = 42;`, + "/user/username/projects/myproject/packages/pkg1/tsconfig.json": `{ + "compilerOptions": { + "outDir": "build", + "preserveSymlinks": true + }, + "references": [{ "path": "../pkg2" }] +}`, + "/user/username/projects/myproject/packages/pkg2/const.ts": "export type TheNum = 42;", + "/user/username/projects/myproject/packages/pkg2/index.ts": "export type { TheNum } from 'const';", + "/user/username/projects/myproject/packages/pkg2/package.json": `{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js" +}`, + "/user/username/projects/myproject/packages/pkg2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "build", + "paths": { + "const": ["./const"] + }, + "preserveSymlinks": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go new file mode 100644 index 00000000000..67773845d66 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go @@ -0,0 +1,61 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "shared resolution should not report error", + CommandLineArgs: []string{"-b", "packages/b", "--verbose", "--traceResolution", "--explainFiles"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/node_modules/a": vfstest.Symlink("/home/src/workspaces/project/packages/a"), + "/home/src/workspaces/project/packages/a/index.js": "export const a = 'a';", + "/home/src/workspaces/project/packages/a/package.json": `{ + "name": "a", + "version": "0.0.0", + "type": "module", + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./index.js" + } + } +}`, + "/home/src/workspaces/project/packages/a/test/index.js": "import 'a';", + "/home/src/workspaces/project/packages/a/tsconfig.json": `{ + "compilerOptions": { + "checkJs": true, + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "module": "nodenext", + "outDir": "types", + }, +}`, + "/home/src/workspaces/project/packages/b/index.js": "export { a } from 'a';", + "/home/src/workspaces/project/packages/b/package.json": `{ + "name": "b", + "version": "0.0.0", + "type": "module" +}`, + "/home/src/workspaces/project/packages/b/tsconfig.json": `{ +"references": [{ "path": "../a" }], + "compilerOptions": { + "checkJs": true, + "module": "nodenext", + "noEmit": true, + "noImplicitAny": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go new file mode 100644 index 00000000000..5509482ca37 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "type reference resolution uses correct options for different resolution options referenced project", + CommandLineArgs: []string{"-b", "packages/pkg1.tsconfig.json", "packages/pkg2.tsconfig.json", "--verbose", "--traceResolution"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/packages/pkg1.tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot1"] + }, + "files": ["./pkg1_index.ts"], +}`, + "/home/src/workspaces/project/packages/pkg1_index.ts": "export const theNum: TheNum = \"type1\";", + "/home/src/workspaces/project/packages/pkg2.tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot2"] + }, + "files": ["./pkg2_index.ts"], +}`, + "/home/src/workspaces/project/packages/pkg2_index.ts": "export const theNum: TheNum2 = \"type2\";", + "/home/src/workspaces/project/packages/typeroot1/sometype/index.d.ts": "declare type TheNum = \"type1\";", + "/home/src/workspaces/project/packages/typeroot2/sometype/index.d.ts": "declare type TheNum2 = \"type2\";", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_when_resolution_is_not_shared_test.go b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_when_resolution_is_not_shared_test.go new file mode 100644 index 00000000000..d95dd7ea542 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_when_resolution_is_not_shared_test.go @@ -0,0 +1,66 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuild_moduleResolution_when_resolution_is_not_shared(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "when resolution is not shared", + CommandLineArgs: []string{"-b", "packages/a", "--verbose", "--traceResolution", "--explainFiles"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/node_modules/a": vfstest.Symlink("/home/src/workspaces/project/packages/a"), + "/home/src/workspaces/project/packages/a/index.js": "export const a = 'a';", + "/home/src/workspaces/project/packages/a/package.json": `{ + "name": "a", + "version": "0.0.0", + "type": "module", + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./index.js" + } + } +}`, + "/home/src/workspaces/project/packages/a/test/index.js": "import 'a';", + "/home/src/workspaces/project/packages/a/tsconfig.json": `{ + "compilerOptions": { + "checkJs": true, + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "module": "nodenext", + "outDir": "types", + }, +}`, + "/home/src/workspaces/project/packages/b/index.js": "export { a } from 'a';", + "/home/src/workspaces/project/packages/b/package.json": `{ + "name": "b", + "version": "0.0.0", + "type": "module" +}`, + "/home/src/workspaces/project/packages/b/tsconfig.json": `{ +"references": [{ "path": "../a" }], + "compilerOptions": { + "checkJs": true, + "module": "nodenext", + "noEmit": true, + "noImplicitAny": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "build b", + CommandLineArgs: []string{"-b", "packages/b", "--verbose", "--traceResolution", "--explainFiles"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go new file mode 100644 index 00000000000..ffad2656dae --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go @@ -0,0 +1,89 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleSpecifiers", + SubScenario: "synthesized module specifiers across projects resolve correctly", + CommandLineArgs: []string{"-b", "src-types", "src-dogs", "--verbose"}, + Cwd: "/home/src/workspaces/packages", + Files: tsctests.FileMap{ + "/home/src/workspaces/packages/src-dogs/dog.ts": `import { DogConfig } from 'src-types'; +import { DOG_CONFIG } from './dogconfig.js'; + +export abstract class Dog { + + public static getCapabilities(): DogConfig { + return DOG_CONFIG; + } +}`, + "/home/src/workspaces/packages/src-dogs/dogconfig.ts": `import { DogConfig } from 'src-types'; + +export const DOG_CONFIG: DogConfig = { + name: 'Default dog', +};`, + "/home/src/workspaces/packages/src-dogs/index.ts": `export * from 'src-types'; +export * from './lassie/lassiedog.js';`, + "/home/src/workspaces/packages/src-dogs/lassie/lassieconfig.ts": `import { DogConfig } from 'src-types'; + +export const LASSIE_CONFIG: DogConfig = { name: 'Lassie' };`, + "/home/src/workspaces/packages/src-dogs/lassie/lassiedog.ts": `import { Dog } from '../dog.js'; +import { LASSIE_CONFIG } from './lassieconfig.js'; + +export class LassieDog extends Dog { + protected static getDogConfig = () => LASSIE_CONFIG; +}`, + "/home/src/workspaces/packages/src-dogs/node_modules": vfstest.Symlink("/home/src/workspaces/packages"), + "/home/src/workspaces/packages/src-dogs/package.json": `{ + "type": "module", + "exports": "./index.js" +}`, + "/home/src/workspaces/packages/src-dogs/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "../src-types" }, + ], + "include": [ + "**/*", + ], +}`, + "/home/src/workspaces/packages/src-types/dogconfig.ts": `export interface DogConfig { + name: string; +}`, + "/home/src/workspaces/packages/src-types/index.ts": "export * from './dogconfig.js';", + "/home/src/workspaces/packages/src-types/node_modules": vfstest.Symlink("/home/src/workspaces/packages"), + "/home/src/workspaces/packages/src-types/package.json": `{ + "type": "module", + "exports": "./index.js" +}`, + "/home/src/workspaces/packages/src-types/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "composite": true, + }, + "include": [ + "**/*", + ], +}`, + "/home/src/workspaces/packages/tsconfig-base.json": `{ + "compilerOptions": { + "declaration": true, + "module": "node16", + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go new file mode 100644 index 00000000000..54e81e17860 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go @@ -0,0 +1,113 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleSpecifiers", + SubScenario: "synthesized module specifiers resolve correctly", + CommandLineArgs: []string{"-b", "--verbose"}, + Cwd: "/home/src/workspaces/packages", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + readonly species: symbol; + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; };`, + "/home/src/workspaces/packages/solution/common/nominal.ts": `export declare type Nominal = T & { + [Symbol.species]: Name; +};`, + "/home/src/workspaces/packages/solution/common/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true + }, + "include": ["nominal.ts"] +}`, + "/home/src/workspaces/packages/solution/sub-project-2/index.ts": `import { MyNominal } from '../sub-project/index'; + +const variable = { + key: 'value' as MyNominal, +}; + +export function getVar(): keyof typeof variable { + return 'key'; +}`, + "/home/src/workspaces/packages/solution/sub-project-2/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "../sub-project" } + ], + "include": ["./index.ts"] +}`, + "/home/src/workspaces/packages/solution/sub-project/index.ts": `import { Nominal } from '../common/nominal'; + +export type MyNominal = Nominal;`, + "/home/src/workspaces/packages/solution/sub-project/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "../common" } + ], + "include": ["./index.ts"] +}`, + "/home/src/workspaces/packages/solution/tsconfig.json": `{ + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./sub-project" }, + { "path": "./sub-project-2" } + ], + "include": [] +}`, + "/home/src/workspaces/packages/tsconfig.base.json": `{ + "compilerOptions": { + "skipLibCheck": true, + "rootDir": "./", + "outDir": "lib" + } +}`, + "/home/src/workspaces/packages/tsconfig.json": `{ + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./solution" }, + ], + "include": [], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_test.go new file mode 100644 index 00000000000..c8af3a2775f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noCheck_dts_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "dts errors", + CommandLineArgs: []string{"-b", "-v", "--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{"-b", "-v"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_with_incremental_test.go new file mode 100644 index 00000000000..56ae9dcbada --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_with_incremental_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noCheck_dts_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "dts errors with incremental", + CommandLineArgs: []string{"-b", "-v", "--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{"-b", "-v"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_test.go new file mode 100644 index 00000000000..0357f56dc54 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noCheck_semantic_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "semantic errors", + CommandLineArgs: []string{"-b", "-v", "--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a: number = \"hello\";", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{"-b", "-v"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_with_incremental_test.go new file mode 100644 index 00000000000..228eb70ff1d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_with_incremental_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noCheck_semantic_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "semantic errors with incremental", + CommandLineArgs: []string{"-b", "-v", "--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a: number = \"hello\";", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{"-b", "-v"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_test.go new file mode 100644 index 00000000000..8b947c5e15c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noCheck_syntax_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "syntax errors", + CommandLineArgs: []string{"-b", "-v", "--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = \"hello", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{"-b", "-v"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_with_incremental_test.go new file mode 100644 index 00000000000..7b517b3ee82 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_with_incremental_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noCheck_syntax_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "syntax errors with incremental", + CommandLineArgs: []string{"-b", "-v", "--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = \"hello", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{"-b", "-v"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_test.go new file mode 100644 index 00000000000..6356887257d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_dts_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "dts errors", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_test.go new file mode 100644 index 00000000000..9f9bfc5d987 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_dts_errors_with_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "dts errors with declaration", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go new file mode 100644 index 00000000000..7cd38f82ed4 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "dts errors with declaration with incremental", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_incremental_test.go new file mode 100644 index 00000000000..faecbc931dd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_incremental_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_dts_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "dts errors with incremental", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_test.go new file mode 100644 index 00000000000..bfec05b9106 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_semantic_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "semantic errors", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a: string = 10;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go new file mode 100644 index 00000000000..6e8371e7444 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_semantic_errors_with_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "semantic errors with declaration", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a: string = 10;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go new file mode 100644 index 00000000000..d891cab7a88 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "semantic errors with declaration with incremental", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a: string = 10;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go new file mode 100644 index 00000000000..eb61b7113be --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_semantic_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "semantic errors with incremental", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a: string = 10;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_test.go new file mode 100644 index 00000000000..8ed7ceb4695 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_test.go @@ -0,0 +1,57 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_syntax_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "syntax errors", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go new file mode 100644 index 00000000000..f93f7ba5947 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go @@ -0,0 +1,57 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_syntax_errors_with_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "syntax errors with declaration", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go new file mode 100644 index 00000000000..8e64e8bfdec --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go @@ -0,0 +1,57 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "syntax errors with declaration with incremental", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go new file mode 100644 index 00000000000..836dc9c49ac --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go @@ -0,0 +1,57 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmitOnError_syntax_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "syntax errors with incremental", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_composite_test.go new file mode 100644 index 00000000000..55874e561d3 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_composite_test.go @@ -0,0 +1,147 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_changes_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes composite", + CommandLineArgs: []string{"-b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "composite": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error but still noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_declaration_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_declaration_test.go new file mode 100644 index 00000000000..e3475fb8ccc --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_declaration_test.go @@ -0,0 +1,147 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_changes_incremental_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes incremental declaration", + CommandLineArgs: []string{"-b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "incremental": true, "declaration": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error but still noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_test.go new file mode 100644 index 00000000000..d97d4932406 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_test.go @@ -0,0 +1,147 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_changes_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes incremental", + CommandLineArgs: []string{"-b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "incremental": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error but still noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go new file mode 100644 index 00000000000..c72a28377c9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_changes_with_initial_noEmit_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes with initial noEmit composite", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "composite": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with emit", + CommandLineArgs: []string{"-b", "-v"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go new file mode 100644 index 00000000000..39b70a64808 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes with initial noEmit incremental declaration", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "incremental": true, "declaration": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with emit", + CommandLineArgs: []string{"-b", "-v"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go new file mode 100644 index 00000000000..912d6d7185a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes with initial noEmit incremental", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "incremental": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with emit", + CommandLineArgs: []string{"-b", "-v"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_test.go new file mode 100644 index 00000000000..627b6d29e4d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go new file mode 100644 index 00000000000..cc977c6f258 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with declaration enable changes", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit - Should report errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit - Should report errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Dts Emit with error", + CommandLineArgs: []string{"-b", "-v", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix the error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { public p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration", "--declarationMap"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..37d4bf24280 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with declaration enable changes with incremental as modules", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit - Should report errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit - Should report errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Dts Emit with error", + CommandLineArgs: []string{"-b", "-v", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix the error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = class { public p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration", "--declarationMap"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go new file mode 100644 index 00000000000..ff5734f0f67 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with declaration enable changes with incremental", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit - Should report errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit - Should report errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Dts Emit with error", + CommandLineArgs: []string{"-b", "-v", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix the error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { public p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration", "--declarationMap"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go new file mode 100644 index 00000000000..64eb845c44d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go @@ -0,0 +1,79 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with declaration enable changes with multiple files", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/c.ts": "export const c = class { private p = 10; };", + "/home/src/projects/project/d.ts": "export const d = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit - Should report errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit - Should report errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Dts Emit with error", + CommandLineArgs: []string{"-b", "-v", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix the error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = class { public p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix the another ", + CommandLineArgs: []string{"-b", "-v", "--noEmit", "--declaration", "--declarationMap"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/c.ts", "export const c = class { public p = 10; };") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..4631e4f762d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go @@ -0,0 +1,70 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with incremental as modules", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_test.go new file mode 100644 index 00000000000..809d6de7bbd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with incremental", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_test.go new file mode 100644 index 00000000000..f54924f1ebf --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors_without_dts_enabled(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..c7d865ac24a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go @@ -0,0 +1,70 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled with incremental as modules", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go new file mode 100644 index 00000000000..fffde15a453 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled with incremental", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_test.go new file mode 100644 index 00000000000..3c05201bb25 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_semantic_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a: number = \"hello\"", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..7c3f85ec04b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go @@ -0,0 +1,70 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors with incremental as modules", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a: number = \"hello\"", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_test.go new file mode 100644 index 00000000000..18e42cf996b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_semantic_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors with incremental", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a: number = \"hello\"", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_test.go new file mode 100644 index 00000000000..aa580d12af9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_syntax_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = \"hello", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..b07e055d3e7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go @@ -0,0 +1,70 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors with incremental as modules", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = \"hello", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_test.go new file mode 100644 index 00000000000..375afa103e5 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_noEmit_syntax_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors with incremental", + CommandLineArgs: []string{"-b", "-v", "--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = \"hello", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{"-b", "-v"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go new file mode 100644 index 00000000000..3c9de6b3737 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "outputPaths", + SubScenario: "when rootDir is not specified and is composite", + CommandLineArgs: []string{"-b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "outDir": "dist", + "composite": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Normal build without change, that does not block emit on error to show files that get emitted", + CommandLineArgs: []string{"-p", "/home/src/workspaces/project/tsconfig.json"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_test.go b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_test.go new file mode 100644 index 00000000000..7cb1d520369 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_test.go @@ -0,0 +1,36 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_outputPaths_when_rootDir_is_not_specified(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "outputPaths", + SubScenario: "when rootDir is not specified", + CommandLineArgs: []string{"-b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "outDir": "dist", + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Normal build without change, that does not block emit on error to show files that get emitted", + CommandLineArgs: []string{"-p", "/home/src/workspaces/project/tsconfig.json"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go new file mode 100644 index 00000000000..53899d81a6c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "outputPaths", + SubScenario: "when rootDir is specified but not all files belong to rootDir and is composite", + CommandLineArgs: []string{"-b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "outDir": "dist", + "rootDir": "src", + "composite": true + }, +}`, + "/home/src/workspaces/project/types/type.ts": "export type t = string;", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Normal build without change, that does not block emit on error to show files that get emitted", + CommandLineArgs: []string{"-p", "/home/src/workspaces/project/tsconfig.json"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go new file mode 100644 index 00000000000..f69fa978ba7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go @@ -0,0 +1,38 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "outputPaths", + SubScenario: "when rootDir is specified but not all files belong to rootDir", + CommandLineArgs: []string{"-b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "outDir": "dist", + "rootDir": "src", + }, +}`, + "/home/src/workspaces/project/types/type.ts": "export type t = string;", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Normal build without change, that does not block emit on error to show files that get emitted", + CommandLineArgs: []string{"-p", "/home/src/workspaces/project/tsconfig.json"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_test.go b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_test.go new file mode 100644 index 00000000000..6f8b7f459ea --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_outputPaths_when_rootDir_is_specified(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "outputPaths", + SubScenario: "when rootDir is specified", + CommandLineArgs: []string{"-b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "outDir": "dist", + "rootDir": "src", + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Normal build without change, that does not block emit on error to show files that get emitted", + CommandLineArgs: []string{"-p", "/home/src/workspaces/project/tsconfig.json"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go b/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go new file mode 100644 index 00000000000..2e2db420a42 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_programUpdates_when_root_is_source_from_project_reference(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "when root is source from project reference", + CommandLineArgs: []string{"--b"}, + Cwd: "/home/src/workspaces/project", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { FOO } from \"./lib/foo\";", + "/home/src/workspaces/project/lib/foo.ts": "export const FOO: string = 'THEFOOEXPORT';", + "/home/src/workspaces/project/lib/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "./dist" + } +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "references": [ { "path": "./lib" } ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesnt change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/lib/foo.ts", "export const FOO: string = 'THEFOOEXPORT';const Bar = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go new file mode 100644 index 00000000000..ecb058c8034 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go @@ -0,0 +1,43 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "programUpdates", + SubScenario: "when root is source from project reference with composite", + CommandLineArgs: []string{"--b"}, + Cwd: "/home/src/workspaces/project", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { FOO } from \"./lib/foo\";", + "/home/src/workspaces/project/lib/foo.ts": "export const FOO: string = 'THEFOOEXPORT';", + "/home/src/workspaces/project/lib/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "./dist" + } +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, + "references": [ { "path": "./lib" } ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesnt change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/lib/foo.ts", "export const FOO: string = 'THEFOOEXPORT';const Bar = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go new file mode 100644 index 00000000000..58b432b5d7c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go @@ -0,0 +1,85 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferenceRedirect", + SubScenario: "uses correct project reference redirect when file belongs to multiple sub-projects", + CommandLineArgs: []string{"--b", "--verbose"}, + Cwd: "/home/src/workspaces/project", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/app.ts": `import { platform } from "pkg"; +const check: "native" = platform;`, + "/home/src/workspaces/project/node_modules/pkg": vfstest.Symlink("/home/src/workspaces/project/pkg"), + "/home/src/workspaces/project/pkg/index.native.ts": "export { platform } from \"./src/util\";", + "/home/src/workspaces/project/pkg/index.ts": "export { platform } from \"./src/util\";", + "/home/src/workspaces/project/pkg/package.json": `{ + "name": "pkg", + "exports": { + ".": { + "react-native": "./index.native.ts", + "types": "./index.ts", + "default": "./index.ts" + } + } +}`, + "/home/src/workspaces/project/pkg/src/util.native.ts": "export const platform = \"native\" as const;", + "/home/src/workspaces/project/pkg/src/util.ts": "export const platform = \"web\" as const;", + "/home/src/workspaces/project/pkg/tsconfig.json": `{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "outDir": "./dist", + "strict": true + }, + "include": ["**/*"], + "exclude": ["dist"], + "references": [ + { "path": "./tsconfig.native.json" } + ] +}`, + "/home/src/workspaces/project/pkg/tsconfig.native.json": `{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "composite": true, + "declaration": true, + "emitDeclarationOnly": true, + "outDir": "./dist", + "strict": true, + "customConditions": ["react-native"], + "moduleSuffixes": [".native", ""] + }, + "include": ["index.native.ts", "src/util.native.ts", "src/util.ts"], + "exclude": ["dist"] +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "customConditions": ["react-native"], + "moduleSuffixes": [".native", ""], + "strict": true, + "noEmit": true + }, + "include": ["app.ts"], + "references": [ + { "path": "./pkg" } + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go new file mode 100644 index 00000000000..a4d86e0381e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go @@ -0,0 +1,47 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferenceWithRootDirInParent", + SubScenario: "builds correctly", + CommandLineArgs: []string{"--b", "src/main", "/home/src/workspaces/solution/src/other"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/src/main/a.ts": `import { b } from './b'; +const a = b;`, + "/home/src/workspaces/solution/src/main/b.ts": "export const b = 0;", + "/home/src/workspaces/solution/src/main/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "references": [ + { "path": "../other" }, + ], +}`, + "/home/src/workspaces/solution/src/other/other.ts": "export const Other = 0;", + "/home/src/workspaces/solution/src/other/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "./src/", + "outDir": "./dist/", + "skipDefaultLibCheck": true, + }, + "exclude": [ + "node_modules", + ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go new file mode 100644 index 00000000000..56e7e45d1ab --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go @@ -0,0 +1,47 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferenceWithRootDirInParent", + SubScenario: "reports error for same tsbuildinfo file because no rootDir in the base", + CommandLineArgs: []string{"--b", "src/main", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/src/main/a.ts": `import { b } from './b'; +const a = b;`, + "/home/src/workspaces/solution/src/main/b.ts": "export const b = 0;", + "/home/src/workspaces/solution/src/main/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", + "references": [ + { "path": "../other" }, + ], +}`, + "/home/src/workspaces/solution/src/other/other.ts": "export const Other = 0;", + "/home/src/workspaces/solution/src/other/tsconfig.json": `{ + "extends": "../../tsconfig.base.json", +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + + "outDir": "./dist/", + "skipDefaultLibCheck": true, + }, + "exclude": [ + "node_modules", + ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go new file mode 100644 index 00000000000..904ca3ab940 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go @@ -0,0 +1,49 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferenceWithRootDirInParent", + SubScenario: "reports error for same tsbuildinfo file", + CommandLineArgs: []string{"--b", "src/main", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/src/main/a.ts": `import { b } from './b'; +const a = b;`, + "/home/src/workspaces/solution/src/main/b.ts": "export const b = 0;", + "/home/src/workspaces/solution/src/main/tsconfig.json": `{ + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, + "references": [{ "path": "../other" }] +}`, + "/home/src/workspaces/solution/src/other/other.ts": "export const Other = 0;", + "/home/src/workspaces/solution/src/other/tsconfig.json": `{ + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "./src/", + "outDir": "./dist/", + "skipDefaultLibCheck": true, + }, + "exclude": [ + "node_modules", + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go new file mode 100644 index 00000000000..7ee8e1e19b6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go @@ -0,0 +1,45 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferenceWithRootDirInParent", + SubScenario: "reports error for same tsbuildinfo file without incremental", + CommandLineArgs: []string{"--b", "src/main", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/src/main/a.ts": `import { b } from './b'; +const a = b;`, + "/home/src/workspaces/solution/src/main/b.ts": "export const b = 0;", + "/home/src/workspaces/solution/src/main/tsconfig.json": `{ + "compilerOptions": { "outDir": "../../dist/" }, + "references": [{ "path": "../other" }] +}`, + "/home/src/workspaces/solution/src/other/other.ts": "export const Other = 0;", + "/home/src/workspaces/solution/src/other/tsconfig.json": `{ + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "./src/", + "outDir": "./dist/", + "skipDefaultLibCheck": true, + }, + "exclude": [ + "node_modules", + ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go new file mode 100644 index 00000000000..9bcd5175962 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go @@ -0,0 +1,50 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferenceWithRootDirInParent", + SubScenario: "reports error for same tsbuildinfo file without incremental with tsc", + CommandLineArgs: []string{"--b", "src/other", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/src/main/a.ts": `import { b } from './b'; +const a = b;`, + "/home/src/workspaces/solution/src/main/b.ts": "export const b = 0;", + "/home/src/workspaces/solution/src/main/tsconfig.json": `{ + "compilerOptions": { "outDir": "../../dist/" }, + "references": [{ "path": "../other" }] +}`, + "/home/src/workspaces/solution/src/other/other.ts": "export const Other = 0;", + "/home/src/workspaces/solution/src/other/tsconfig.json": `{ + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "./src/", + "outDir": "./dist/", + "skipDefaultLibCheck": true, + }, + "exclude": [ + "node_modules", + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Running tsc on main", + CommandLineArgs: []string{"-p", "src/main"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go new file mode 100644 index 00000000000..96b120ef167 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go @@ -0,0 +1,49 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferenceWithRootDirInParent", + SubScenario: "reports no error when tsbuildinfo differ", + CommandLineArgs: []string{"--b", "src/main/tsconfig.main.json", "--verbose"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/src/main/a.ts": `import { b } from './b'; +const a = b;`, + "/home/src/workspaces/solution/src/main/b.ts": "export const b = 0;", + "/home/src/workspaces/solution/src/main/tsconfig.main.json": `{ + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, + "references": [{ "path": "../other/tsconfig.other.json" }] +}`, + "/home/src/workspaces/solution/src/other/other.ts": "export const Other = 0;", + "/home/src/workspaces/solution/src/other/tsconfig.other.json": `{ + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, +}`, + "/home/src/workspaces/solution/tsconfig.base.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "./src/", + "outDir": "./dist/", + "skipDefaultLibCheck": true, + }, + "exclude": [ + "node_modules", + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go new file mode 100644 index 00000000000..c096cfcc4a4 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go @@ -0,0 +1,187 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 23 projects in a solution", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg10/index.ts": "export const pkg10 = 10;", + "/user/username/projects/myproject/pkg10/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg11/index.ts": "export const pkg11 = 11;", + "/user/username/projects/myproject/pkg11/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg12/index.ts": "export const pkg12 = 12;", + "/user/username/projects/myproject/pkg12/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg13/index.ts": "export const pkg13 = 13;", + "/user/username/projects/myproject/pkg13/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg14/index.ts": "export const pkg14 = 14;", + "/user/username/projects/myproject/pkg14/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg15/index.ts": "export const pkg15 = 15;", + "/user/username/projects/myproject/pkg15/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg16/index.ts": "export const pkg16 = 16;", + "/user/username/projects/myproject/pkg16/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg17/index.ts": "export const pkg17 = 17;", + "/user/username/projects/myproject/pkg17/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg18/index.ts": "export const pkg18 = 18;", + "/user/username/projects/myproject/pkg18/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg19/index.ts": "export const pkg19 = 19;", + "/user/username/projects/myproject/pkg19/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg20/index.ts": "export const pkg20 = 20;", + "/user/username/projects/myproject/pkg20/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg21/index.ts": "export const pkg21 = 21;", + "/user/username/projects/myproject/pkg21/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg22/index.ts": "export const pkg22 = 22;", + "/user/username/projects/myproject/pkg22/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg5/index.ts": "export const pkg5 = 5;", + "/user/username/projects/myproject/pkg5/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg6/index.ts": "export const pkg6 = 6;", + "/user/username/projects/myproject/pkg6/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg7/index.ts": "export const pkg7 = 7;", + "/user/username/projects/myproject/pkg7/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg8/index.ts": "export const pkg8 = 8;", + "/user/username/projects/myproject/pkg8/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg9/index.ts": "export const pkg9 = 9;", + "/user/username/projects/myproject/pkg9/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" }, + { "path": "./pkg5" }, + { "path": "./pkg6" }, + { "path": "./pkg7" }, + { "path": "./pkg8" }, + { "path": "./pkg9" }, + { "path": "./pkg10" }, + { "path": "./pkg11" }, + { "path": "./pkg12" }, + { "path": "./pkg13" }, + { "path": "./pkg14" }, + { "path": "./pkg15" }, + { "path": "./pkg16" }, + { "path": "./pkg17" }, + { "path": "./pkg18" }, + { "path": "./pkg19" }, + { "path": "./pkg20" }, + { "path": "./pkg21" }, + { "path": "./pkg22" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go new file mode 100644 index 00000000000..1dca1133b19 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go @@ -0,0 +1,187 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 23 projects in a solution with --builders 3", + CommandLineArgs: []string{"-b", "-v", "--builders", "3"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg10/index.ts": "export const pkg10 = 10;", + "/user/username/projects/myproject/pkg10/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg11/index.ts": "export const pkg11 = 11;", + "/user/username/projects/myproject/pkg11/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg12/index.ts": "export const pkg12 = 12;", + "/user/username/projects/myproject/pkg12/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg13/index.ts": "export const pkg13 = 13;", + "/user/username/projects/myproject/pkg13/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg14/index.ts": "export const pkg14 = 14;", + "/user/username/projects/myproject/pkg14/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg15/index.ts": "export const pkg15 = 15;", + "/user/username/projects/myproject/pkg15/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg16/index.ts": "export const pkg16 = 16;", + "/user/username/projects/myproject/pkg16/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg17/index.ts": "export const pkg17 = 17;", + "/user/username/projects/myproject/pkg17/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg18/index.ts": "export const pkg18 = 18;", + "/user/username/projects/myproject/pkg18/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg19/index.ts": "export const pkg19 = 19;", + "/user/username/projects/myproject/pkg19/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg20/index.ts": "export const pkg20 = 20;", + "/user/username/projects/myproject/pkg20/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg21/index.ts": "export const pkg21 = 21;", + "/user/username/projects/myproject/pkg21/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg22/index.ts": "export const pkg22 = 22;", + "/user/username/projects/myproject/pkg22/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg5/index.ts": "export const pkg5 = 5;", + "/user/username/projects/myproject/pkg5/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg6/index.ts": "export const pkg6 = 6;", + "/user/username/projects/myproject/pkg6/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg7/index.ts": "export const pkg7 = 7;", + "/user/username/projects/myproject/pkg7/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg8/index.ts": "export const pkg8 = 8;", + "/user/username/projects/myproject/pkg8/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg9/index.ts": "export const pkg9 = 9;", + "/user/username/projects/myproject/pkg9/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" }, + { "path": "./pkg5" }, + { "path": "./pkg6" }, + { "path": "./pkg7" }, + { "path": "./pkg8" }, + { "path": "./pkg9" }, + { "path": "./pkg10" }, + { "path": "./pkg11" }, + { "path": "./pkg12" }, + { "path": "./pkg13" }, + { "path": "./pkg14" }, + { "path": "./pkg15" }, + { "path": "./pkg16" }, + { "path": "./pkg17" }, + { "path": "./pkg18" }, + { "path": "./pkg19" }, + { "path": "./pkg20" }, + { "path": "./pkg21" }, + { "path": "./pkg22" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go new file mode 100644 index 00000000000..50868c0bd2c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go @@ -0,0 +1,67 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 3 projects in a solution", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go new file mode 100644 index 00000000000..1866c932307 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go @@ -0,0 +1,67 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 3 projects in a solution with --builders 1", + CommandLineArgs: []string{"-b", "-v", "--builders", "1"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go new file mode 100644 index 00000000000..501a49bf3d0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go @@ -0,0 +1,79 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 5 projects in a solution", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go new file mode 100644 index 00000000000..8a3a4fb1d54 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go @@ -0,0 +1,79 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 5 projects in a solution with --builders 2", + CommandLineArgs: []string{"-b", "-v", "--builders", "2"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go new file mode 100644 index 00000000000..15f484a6bd1 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go @@ -0,0 +1,97 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 8 projects in a solution", + CommandLineArgs: []string{"-b", "-v"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg5/index.ts": "export const pkg5 = 5;", + "/user/username/projects/myproject/pkg5/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg6/index.ts": "export const pkg6 = 6;", + "/user/username/projects/myproject/pkg6/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg7/index.ts": "export const pkg7 = 7;", + "/user/username/projects/myproject/pkg7/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" }, + { "path": "./pkg5" }, + { "path": "./pkg6" }, + { "path": "./pkg7" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go new file mode 100644 index 00000000000..ba6b9486aa6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go @@ -0,0 +1,97 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectsBuilding", + SubScenario: "when there are 8 projects in a solution with --builders 3", + CommandLineArgs: []string{"-b", "-v", "--builders", "3"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg0/index.ts": "export const pkg0 = 0;", + "/user/username/projects/myproject/pkg0/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + +}`, + "/user/username/projects/myproject/pkg1/index.ts": "export const pkg1 = 1;", + "/user/username/projects/myproject/pkg1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg2/index.ts": "export const pkg2 = 2;", + "/user/username/projects/myproject/pkg2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg3/index.ts": "export const pkg3 = 3;", + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg4/index.ts": "export const pkg4 = 4;", + "/user/username/projects/myproject/pkg4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg5/index.ts": "export const pkg5 = 5;", + "/user/username/projects/myproject/pkg5/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg6/index.ts": "export const pkg6 = 6;", + "/user/username/projects/myproject/pkg6/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/pkg7/index.ts": "export const pkg7 = 7;", + "/user/username/projects/myproject/pkg7/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../pkg0" }], +}`, + "/user/username/projects/myproject/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "./pkg0" }, + { "path": "./pkg1" }, + { "path": "./pkg2" }, + { "path": "./pkg3" }, + { "path": "./pkg4" }, + { "path": "./pkg5" }, + { "path": "./pkg6" }, + { "path": "./pkg7" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts doesn't change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "dts change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/myproject/pkg0/index.ts", "export const pkg0 = 0;const someConst2 = 10;export const someConst = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go new file mode 100644 index 00000000000..bb15b48cb6d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "files containing json file non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "files": [ "src/index.ts", "src/hello.json", ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_test.go new file mode 100644 index 00000000000..7e8f689a607 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_files_containing_json_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "files containing json file", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "files": [ "src/index.ts", "src/hello.json", ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go new file mode 100644 index 00000000000..6da387821c9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go @@ -0,0 +1,61 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "importing json module from project reference", + CommandLineArgs: []string{"--b", "project", "--verbose", "--explainFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/main/index.ts": `import { foo } from '../strings/foo.json'; +console.log(foo);`, + "/home/src/workspaces/solution/project/main/tsconfig.json": `{ + "extends": "../tsconfig.json", + "include": [ + "./**/*.ts", + ], + "references": [{ + "path": "../strings/tsconfig.json", + }], +}`, + "/home/src/workspaces/solution/project/strings/foo.json": `{ + "foo": "bar baz" +}`, + "/home/src/workspaces/solution/project/strings/tsconfig.json": `{ + "extends": "../tsconfig.json", + "include": ["foo.json"], + "references": [], +}`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "rootDir": "./", + "composite": true, + "resolveJsonModule": true, + "strict": true, + "esModuleInterop": true, + }, + "references": [ + { "path": "./strings/tsconfig.json" }, + { "path": "./main/tsconfig.json" }, + ], + "files": [], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_non_composite_test.go new file mode 100644 index 00000000000..62217a5339c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_non_composite_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_and_files_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include and files non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "files": [ "src/hello.json" ], "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_test.go new file mode 100644 index 00000000000..3d984c5237a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_and_files(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include and files", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "files": [ "src/hello.json" ], "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go new file mode 100644 index 00000000000..2dd52ed2d12 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include of json along with other include and file name matches ts file non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/index.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./index.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*", "src/**/*.json" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go new file mode 100644 index 00000000000..28ec47dde32 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include of json along with other include and file name matches ts file", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/index.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./index.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*", "src/**/*.json" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go new file mode 100644 index 00000000000..3981f4023ba --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include of json along with other include non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*", "src/**/*.json" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go new file mode 100644 index 00000000000..1ffd7203a98 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include of json along with other include", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*", "src/**/*.json" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_non_composite_test.go new file mode 100644 index 00000000000..bf0dc842351 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_non_composite_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_only_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include only non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_test.go new file mode 100644 index 00000000000..2c36707b850 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_only(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include only", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go new file mode 100644 index 00000000000..3528190b93b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include only with json not in rootDir non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "../hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + "rootDir": "src", + }, + "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go new file mode 100644 index 00000000000..da77019adbb --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include only with json not in rootDir", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "../hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + "rootDir": "src", + }, + "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go new file mode 100644 index 00000000000..43b1e7acbd3 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include only with json without rootDir but outside configDirectory non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "../../hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go new file mode 100644 index 00000000000..3eb346110df --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include only with json without rootDir but outside configDirectory", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "../../hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go new file mode 100644 index 00000000000..fe6552827ba --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include only without outDir non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_test.go new file mode 100644 index 00000000000..cb9df47b821 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_include_only_without_outDir(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "include only without outDir", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + + "skipDefaultLibCheck": true, + + }, + "include": [ "src/**/*" ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_non_composite_test.go new file mode 100644 index 00000000000..c477b673e60 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_non_composite_test.go @@ -0,0 +1,44 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_sourcemap_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "sourcemap non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + "sourceMap": true, + }, + "files": [ "src/index.ts", "src/hello.json", ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_test.go new file mode 100644 index 00000000000..2782151df03 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_test.go @@ -0,0 +1,44 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_sourcemap(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "sourcemap", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "dist", + "skipDefaultLibCheck": true, + "sourceMap": true, + }, + "files": [ "src/index.ts", "src/hello.json", ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_non_composite_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_non_composite_test.go new file mode 100644 index 00000000000..366e9a21d77 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_non_composite_test.go @@ -0,0 +1,44 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_without_outDir_non_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "without outDir non-composite", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + + "skipDefaultLibCheck": true, + + }, + "files": [ "src/index.ts", "src/hello.json", ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_test.go b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_test.go new file mode 100644 index 00000000000..74e528b067e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_test.go @@ -0,0 +1,44 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_resolveJsonModule_without_outDir(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "resolveJsonModule", + SubScenario: "without outDir", + CommandLineArgs: []string{"--b", "project", "--v", "--explainFiles", "--listEmittedFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/src/hello.json": `{ + "hello": "world" +}`, + "/home/src/workspaces/solution/project/src/index.ts": `import hello from "./hello.json" +export default hello.hello`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + + "skipDefaultLibCheck": true, + + }, + "files": [ "src/index.ts", "src/hello.json", ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go new file mode 100644 index 00000000000..752fd1fdb9a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go @@ -0,0 +1,47 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "roots", + SubScenario: "when consecutive and non consecutive are mixed", + CommandLineArgs: []string{"--b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/anotherNonConsecutive.ts": `import { random } from "./random2"; +export const nonConsecutive = "hello";`, + "/home/src/workspaces/project/asArray1.ts": `import { random } from "./random1"; +export const x = "hello";`, + "/home/src/workspaces/project/asArray2.ts": "export const x = \"hello\";", + "/home/src/workspaces/project/asArray3.ts": "export const x = \"hello\";", + "/home/src/workspaces/project/file1.ts": "export const x = \"hello\";", + "/home/src/workspaces/project/file2.ts": "export const y = \"world\";", + "/home/src/workspaces/project/nonconsecutive.ts": `import { random } from "./random"; + export const nonConsecutive = "hello";`, + "/home/src/workspaces/project/random.d.ts": "export const random = \"hello\";", + "/home/src/workspaces/project/random1.d.ts": "export const random = \"hello\";", + "/home/src/workspaces/project/random2.d.ts": "export const random = \"hello\";", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "include": ["file*.ts", "nonconsecutive*.ts", "asArray*.ts", "anotherNonConsecutive.ts"], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete file1", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/file1.d.ts") + sys.Remove("/home/src/workspaces/project/file1.js") + sys.Remove("/home/src/workspaces/project/file1.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_files_are_not_consecutive_test.go b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_files_are_not_consecutive_test.go new file mode 100644 index 00000000000..821e951f647 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_files_are_not_consecutive_test.go @@ -0,0 +1,38 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_roots_when_files_are_not_consecutive(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "roots", + SubScenario: "when files are not consecutive", + CommandLineArgs: []string{"--b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/file1.ts": "export const x = \"hello\";", + "/home/src/workspaces/project/file2.ts": `import { random } from "./random"; +export const y = "world";`, + "/home/src/workspaces/project/random.d.ts": "export const random = \"world\";", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "include": ["file*.ts"], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete file1", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/file1.d.ts") + sys.Remove("/home/src/workspaces/project/file1.js") + sys.Remove("/home/src/workspaces/project/file1.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_multiple_root_files_are_consecutive_test.go b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_multiple_root_files_are_consecutive_test.go new file mode 100644 index 00000000000..8557804cfd1 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_multiple_root_files_are_consecutive_test.go @@ -0,0 +1,38 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_roots_when_multiple_root_files_are_consecutive(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "roots", + SubScenario: "when multiple root files are consecutive", + CommandLineArgs: []string{"--b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/file1.ts": "export const x = \"hello\";", + "/home/src/workspaces/project/file2.ts": "export const y = \"world\";", + "/home/src/workspaces/project/file3.ts": "export const y = \"world\";", + "/home/src/workspaces/project/file4.ts": "export const y = \"world\";", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "include": ["*.ts"], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete file1", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/file1.d.ts") + sys.Remove("/home/src/workspaces/project/file1.js") + sys.Remove("/home/src/workspaces/project/file1.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go new file mode 100644 index 00000000000..555e95456dd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go @@ -0,0 +1,89 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "roots", + SubScenario: "when root file is from referenced project and shared is first", + CommandLineArgs: []string{"--b", "projects/server", "-v", "--traceResolution", "--explainFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/projects/server/src/server.ts": `import { MyClass } from ':shared/myClass.js'; +console.log('Hello, world!');`, + "/home/src/workspaces/solution/projects/server/tsconfig.json": `{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "..", + "outDir": "./dist", + "paths": { + ":shared/*": ["./src/../../shared/src/*"], + }, + }, + "include": [ "../shared/src/**/*.ts", "src/**/*.ts" ], + "references": [ + { "path": "../shared" }, + ], +}`, + "/home/src/workspaces/solution/projects/shared/src/logging.ts": `export function log(str: string) { + console.log(str); +}`, + "/home/src/workspaces/solution/projects/shared/src/myClass.ts": "export class MyClass { }", + "/home/src/workspaces/solution/projects/shared/src/random.ts": `export function randomFn(str: string) { + console.log(str); +}`, + "/home/src/workspaces/solution/projects/shared/tsconfig.json": `{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + }, + "include": ["src/**/*.ts"], +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "projects/server" }, + { "path": "projects/shared" }, + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "edit logging file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/projects/shared/src/logging.ts", `export function log(str: string) { + console.log(str); +}export const x = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete random file", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/solution/projects/shared/src/random.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_test.go b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_test.go new file mode 100644 index 00000000000..5f3faad0899 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_test.go @@ -0,0 +1,89 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_roots_when_root_file_is_from_referenced_project(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "roots", + SubScenario: "when root file is from referenced project", + CommandLineArgs: []string{"--b", "projects/server", "-v", "--traceResolution", "--explainFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/projects/server/src/server.ts": `import { MyClass } from ':shared/myClass.js'; +console.log('Hello, world!');`, + "/home/src/workspaces/solution/projects/server/tsconfig.json": `{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "..", + "outDir": "./dist", + "paths": { + ":shared/*": ["./src/../../shared/src/*"], + }, + }, + "include": [ "src/**/*.ts", "../shared/src/**/*.ts" ], + "references": [ + { "path": "../shared" }, + ], +}`, + "/home/src/workspaces/solution/projects/shared/src/logging.ts": `export function log(str: string) { + console.log(str); +}`, + "/home/src/workspaces/solution/projects/shared/src/myClass.ts": "export class MyClass { }", + "/home/src/workspaces/solution/projects/shared/src/random.ts": `export function randomFn(str: string) { + console.log(str); +}`, + "/home/src/workspaces/solution/projects/shared/tsconfig.json": `{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + }, + "include": ["src/**/*.ts"], +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "projects/server" }, + { "path": "projects/shared" }, + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "edit logging file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/projects/shared/src/logging.ts", `export function log(str: string) { + console.log(str); +}export const x = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete random file", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/solution/projects/shared/src/random.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_two_root_files_are_consecutive_test.go b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_two_root_files_are_consecutive_test.go new file mode 100644 index 00000000000..ebba8873ac0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_roots_when_two_root_files_are_consecutive_test.go @@ -0,0 +1,36 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_roots_when_two_root_files_are_consecutive(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "roots", + SubScenario: "when two root files are consecutive", + CommandLineArgs: []string{"--b", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/file1.ts": "export const x = \"hello\";", + "/home/src/workspaces/project/file2.ts": "export const y = \"world\";", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "include": ["*.ts"], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete file1", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/file1.d.ts") + sys.Remove("/home/src/workspaces/project/file1.js") + sys.Remove("/home/src/workspaces/project/file1.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_always_builds_under_with_force_option_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_always_builds_under_with_force_option_test.go new file mode 100644 index 00000000000..cbe8fbe6d3c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_always_builds_under_with_force_option_test.go @@ -0,0 +1,76 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_always_builds_under_with_force_option(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "always builds under with force option", + CommandLineArgs: []string{"--b", "tests", "--force"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go new file mode 100644 index 00000000000..50829146622 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go @@ -0,0 +1,72 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "building project in not build order doesnt throw error", + CommandLineArgs: []string{"--b", "logic2/tsconfig.json", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go new file mode 100644 index 00000000000..b5ca34c638f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go @@ -0,0 +1,72 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "builds correctly when declarationDir is specified", + CommandLineArgs: []string{"--b", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "declarationDir": "out/decls", + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go new file mode 100644 index 00000000000..86fae87c8e9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go @@ -0,0 +1,72 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_builds_correctly_when_outDir_is_specified(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "builds correctly when outDir is specified", + CommandLineArgs: []string{"--b", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "outDir": "outDir", + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go new file mode 100644 index 00000000000..0a0d9ada76e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go @@ -0,0 +1,72 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "builds correctly when project is not composite or doesnt have any references", + CommandLineArgs: []string{"--b", "core", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go new file mode 100644 index 00000000000..dc4f7bd9407 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go @@ -0,0 +1,76 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "builds downstream projects even if upstream projects have errors", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.muitply(); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go new file mode 100644 index 00000000000..b3b00eb12a2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go @@ -0,0 +1,110 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_can_detect_when_and_what_to_rebuild(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "can detect when and what to rebuild", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Only builds the leaf node project", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/tests/index.ts", "const m = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Detects type-only changes in upstream projects", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "WELCOME PLANET"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "rebuilds when tsconfig changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/tests/tsconfig.json", `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, "target": "es2020", + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go new file mode 100644 index 00000000000..4e52f50fbab --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go @@ -0,0 +1,72 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "cleaning project in not build order doesnt throw error", + CommandLineArgs: []string{"--b", "logic2", "--clean"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go new file mode 100644 index 00000000000..111ad436efe --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go @@ -0,0 +1,72 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "does not write any files in a dry build", + CommandLineArgs: []string{"--b", "tests", "--dry"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_explainFiles_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_explainFiles_test.go new file mode 100644 index 00000000000..b5300371f07 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_explainFiles_test.go @@ -0,0 +1,97 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_explainFiles(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "explainFiles", + CommandLineArgs: []string{"--b", "tests", "--explainFiles", "--v"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-doesnt-change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } +class someClass2 { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go new file mode 100644 index 00000000000..afe5f9f0d7e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go @@ -0,0 +1,77 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "indicates that it would skip builds during a dry build", + CommandLineArgs: []string{"--b", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "--dry", + CommandLineArgs: []string{"--b", "tests", "--dry"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_listEmittedFiles_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_listEmittedFiles_test.go new file mode 100644 index 00000000000..3d20339c805 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_listEmittedFiles_test.go @@ -0,0 +1,97 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_listEmittedFiles(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "listEmittedFiles", + CommandLineArgs: []string{"--b", "tests", "--listEmittedFiles"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-doesnt-change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } +class someClass2 { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_listFiles_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_listFiles_test.go new file mode 100644 index 00000000000..73b8a30ecf0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_listFiles_test.go @@ -0,0 +1,97 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_listFiles(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "listFiles", + CommandLineArgs: []string{"--b", "tests", "--listFiles"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-doesnt-change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } +class someClass2 { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go new file mode 100644 index 00000000000..ee0f8007604 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go @@ -0,0 +1,81 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "rebuilds completely when version in tsbuildinfo doesnt match ts version", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "convert tsbuildInfo version to something that is say to previous version", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/tsconfig.tsbuildinfo", "{\"version\":\"FakeTsPreviousVersion\",\"root\":[[2,4]],\"fileNames\":[\"lib.es2025.full.d.ts\",\"./anotherModule.ts\",\"./index.ts\",\"./some_decl.d.ts\"],\"fileInfos\":[{\"version\":\"8859c12c614ce56ba9a18e58384a198f-/// \\ninterface Boolean {}\\ninterface Function {}\\ninterface CallableFunction {}\\ninterface NewableFunction {}\\ninterface IArguments {}\\ninterface Number { toExponential: any; }\\ninterface Object {}\\ninterface RegExp {}\\ninterface String { charAt: any; }\\ninterface Array { length: number; [n: number]: T; }\\ninterface ReadonlyArray {}\\ninterface SymbolConstructor {\\n (desc?: string | number): symbol;\\n for(name: string): symbol;\\n readonly toStringTag: symbol;\\n}\\ndeclare var Symbol: SymbolConstructor;\\ninterface Symbol {\\n readonly [Symbol.toStringTag]: string;\\n}\\ndeclare const console: { log(msg: any): void; };\",\"affectsGlobalScope\":true,\"impliedNodeFormat\":1},{\"version\":\"19cd44ed7278957051fca663f821c916-export const World = \\\"hello\\\";\",\"signature\":\"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \\\"hello\\\";\\n\",\"impliedNodeFormat\":1},{\"version\":\"2753a1085d587a7d57069e1105af24ec-export const someString: string = \\\"HELLO WORLD\\\";\\nexport function leftPad(s: string, n: number) { return s + n; }\\nexport function multiply(a: number, b: number) { return a * b; }\",\"signature\":\"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\\nexport declare function leftPad(s: string, n: number): string;\\nexport declare function multiply(a: number, b: number): number;\\n\",\"impliedNodeFormat\":1},{\"version\":\"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;\",\"affectsGlobalScope\":true,\"impliedNodeFormat\":1}],\"options\":{\"composite\":true,\"declaration\":true,\"declarationMap\":true,\"skipDefaultLibCheck\":true},\"latestChangedDtsFile\":\"./index.d.ts\"}") + sys.WriteFile("/user/username/projects/sample1/logic/tsconfig.tsbuildinfo", "{\"version\":\"FakeTsPreviousVersion\",\"root\":[4],\"fileNames\":[\"lib.es2025.full.d.ts\",\"../core/index.d.ts\",\"../core/anotherModule.d.ts\",\"./index.ts\"],\"fileInfos\":[{\"version\":\"8859c12c614ce56ba9a18e58384a198f-/// \\ninterface Boolean {}\\ninterface Function {}\\ninterface CallableFunction {}\\ninterface NewableFunction {}\\ninterface IArguments {}\\ninterface Number { toExponential: any; }\\ninterface Object {}\\ninterface RegExp {}\\ninterface String { charAt: any; }\\ninterface Array { length: number; [n: number]: T; }\\ninterface ReadonlyArray {}\\ninterface SymbolConstructor {\\n (desc?: string | number): symbol;\\n for(name: string): symbol;\\n readonly toStringTag: symbol;\\n}\\ndeclare var Symbol: SymbolConstructor;\\ninterface Symbol {\\n readonly [Symbol.toStringTag]: string;\\n}\\ndeclare const console: { log(msg: any): void; };\",\"affectsGlobalScope\":true,\"impliedNodeFormat\":1},\"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\\nexport declare function leftPad(s: string, n: number): string;\\nexport declare function multiply(a: number, b: number): number;\\n//# sourceMappingURL=index.d.ts.map\",\"5ef600f6f6585506cfe942fc161e76c5-export declare const World = \\\"hello\\\";\\n//# sourceMappingURL=anotherModule.d.ts.map\",{\"version\":\"590556060bc156a64834010df8cda255-import * as c from '../core/index';\\nexport function getSecondsInDay() {\\n return c.multiply(10, 15);\\n}\\nimport * as mod from '../core/anotherModule';\\nexport const m = mod;\",\"signature\":\"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\\nimport * as mod from '../core/anotherModule';\\nexport declare const m: typeof mod;\\n\",\"impliedNodeFormat\":1}],\"fileIdsList\":[[2,3]],\"options\":{\"composite\":true,\"declaration\":true,\"skipDefaultLibCheck\":true,\"sourceMap\":true},\"referencedMap\":[[4,1]],\"latestChangedDtsFile\":\"./index.d.ts\"}") + sys.WriteFile("/user/username/projects/sample1/tests/tsconfig.tsbuildinfo", "{\"version\":\"FakeTsPreviousVersion\",\"root\":[5],\"fileNames\":[\"lib.es2025.full.d.ts\",\"../core/index.d.ts\",\"../core/anotherModule.d.ts\",\"../logic/index.d.ts\",\"./index.ts\"],\"fileInfos\":[{\"version\":\"8859c12c614ce56ba9a18e58384a198f-/// \\ninterface Boolean {}\\ninterface Function {}\\ninterface CallableFunction {}\\ninterface NewableFunction {}\\ninterface IArguments {}\\ninterface Number { toExponential: any; }\\ninterface Object {}\\ninterface RegExp {}\\ninterface String { charAt: any; }\\ninterface Array { length: number; [n: number]: T; }\\ninterface ReadonlyArray {}\\ninterface SymbolConstructor {\\n (desc?: string | number): symbol;\\n for(name: string): symbol;\\n readonly toStringTag: symbol;\\n}\\ndeclare var Symbol: SymbolConstructor;\\ninterface Symbol {\\n readonly [Symbol.toStringTag]: string;\\n}\\ndeclare const console: { log(msg: any): void; };\",\"affectsGlobalScope\":true,\"impliedNodeFormat\":1},\"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\\nexport declare function leftPad(s: string, n: number): string;\\nexport declare function multiply(a: number, b: number): number;\\n//# sourceMappingURL=index.d.ts.map\",\"5ef600f6f6585506cfe942fc161e76c5-export declare const World = \\\"hello\\\";\\n//# sourceMappingURL=anotherModule.d.ts.map\",\"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\\nimport * as mod from '../core/anotherModule';\\nexport declare const m: typeof mod;\\n\",{\"version\":\"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\\nimport * as logic from '../logic/index';\\n\\nc.leftPad(\\\"\\\", 10);\\nlogic.getSecondsInDay();\\n\\nimport * as mod from '../core/anotherModule';\\nexport const m = mod;\",\"signature\":\"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\\nexport declare const m: typeof mod;\\n\",\"impliedNodeFormat\":1}],\"fileIdsList\":[[3],[2,3,4]],\"options\":{\"composite\":true,\"declaration\":true,\"skipDefaultLibCheck\":true},\"referencedMap\":[[4,1],[5,2]],\"latestChangedDtsFile\":\"./index.d.ts\"}") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go new file mode 100644 index 00000000000..88e8cbb9b05 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go @@ -0,0 +1,77 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "rebuilds from start if force option is set", + CommandLineArgs: []string{"--b", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "--force build", + CommandLineArgs: []string{"--b", "tests", "--verbose", "--force"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go new file mode 100644 index 00000000000..057b0855b58 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go @@ -0,0 +1,86 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_rebuilds_when_extended_config_file_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "rebuilds when extended config file changes", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.base.json": `{ + "compilerOptions": { + "target": "es5" + } +}`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "extends": "./tsconfig.base.json", "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "change extended file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/tests/tsconfig.base.json", `{ + "compilerOptions": { } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_removes_all_files_it_built_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_removes_all_files_it_built_test.go new file mode 100644 index 00000000000..59032c6c552 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_removes_all_files_it_built_test.go @@ -0,0 +1,82 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_removes_all_files_it_built(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "removes all files it built", + CommandLineArgs: []string{"--b", "tests"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "removes all files it built", + CommandLineArgs: []string{"--b", "tests", "--clean"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change --clean", + CommandLineArgs: []string{"--b", "tests", "--clean"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_test.go new file mode 100644 index 00000000000..1c618b00878 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_test.go @@ -0,0 +1,67 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_reports_error_if_input_file_is_missing(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "reports error if input file is missing", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "files": ["anotherModule.ts", "index.ts", "some_decl.d.ts"], +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go new file mode 100644 index 00000000000..340e99f11df --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go @@ -0,0 +1,67 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "reports error if input file is missing with force", + CommandLineArgs: []string{"--b", "tests", "--verbose", "--force"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "files": ["anotherModule.ts", "index.ts", "some_decl.d.ts"], +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_sample_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_sample_test.go new file mode 100644 index 00000000000..07b09a96981 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_sample_test.go @@ -0,0 +1,119 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_sample(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "sample", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-doesnt-change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } +class someClass2 { }`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "when logic config changes declaration dir", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/logic/tsconfig.json", `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationDir": "decls", + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go new file mode 100644 index 00000000000..5922a4b613e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go @@ -0,0 +1,85 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors", + CommandLineArgs: []string{"--b", "tests", "--verbose", "--stopBuildOnErrors"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }multiply();`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go new file mode 100644 index 00000000000..e6182d0c44f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go @@ -0,0 +1,84 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors when test does not reference core", + CommandLineArgs: []string{"--b", "tests", "--verbose", "--stopBuildOnErrors"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }multiply();`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_tsbuildinfo_has_error_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_tsbuildinfo_has_error_test.go new file mode 100644 index 00000000000..648ef1c33e4 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_tsbuildinfo_has_error_test.go @@ -0,0 +1,31 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_tsbuildinfo_has_error(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "tsbuildinfo has error", + CommandLineArgs: []string{"--b", "-i", "-v"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/main.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": "{}", + "/home/src/workspaces/project/tsconfig.tsbuildinfo": "Some random string", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "tsbuildinfo written has error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.tsbuildinfo", "Some random string{\"version\":\"FakeTSVersion\",\"root\":[2],\"fileNames\":[\"lib.es2025.full.d.ts\",\"./main.ts\"],\"fileInfos\":[{\"version\":\"8859c12c614ce56ba9a18e58384a198f-/// \\ninterface Boolean {}\\ninterface Function {}\\ninterface CallableFunction {}\\ninterface NewableFunction {}\\ninterface IArguments {}\\ninterface Number { toExponential: any; }\\ninterface Object {}\\ninterface RegExp {}\\ninterface String { charAt: any; }\\ninterface Array { length: number; [n: number]: T; }\\ninterface ReadonlyArray {}\\ninterface SymbolConstructor {\\n (desc?: string | number): symbol;\\n for(name: string): symbol;\\n readonly toStringTag: symbol;\\n}\\ndeclare var Symbol: SymbolConstructor;\\ninterface Symbol {\\n readonly [Symbol.toStringTag]: string;\\n}\\ndeclare const console: { log(msg: any): void; };\",\"affectsGlobalScope\":true,\"impliedNodeFormat\":1},\"28e8748a7acd58f4f59388926e914f86-export const x = 10;\"]}") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declarationMap_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declarationMap_changes_test.go new file mode 100644 index 00000000000..c424556c21b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declarationMap_changes_test.go @@ -0,0 +1,100 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_when_declarationMap_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "when declarationMap changes", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Disable declarationMap", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/tsconfig.json", `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": false, + "skipDefaultLibCheck": true, + }, +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Enable declarationMap", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/tsconfig.json", `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declaration_option_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declaration_option_changes_test.go new file mode 100644 index 00000000000..6f38051deb6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declaration_option_changes_test.go @@ -0,0 +1,82 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_when_declaration_option_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "when declaration option changes", + CommandLineArgs: []string{"--b", "core", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, "declaration": true, + "skipDefaultLibCheck": true, + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_esModuleInterop_option_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_esModuleInterop_option_changes_test.go new file mode 100644 index 00000000000..b9e4e3aafca --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_esModuleInterop_option_changes_test.go @@ -0,0 +1,92 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_when_esModuleInterop_option_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "when esModuleInterop option changes", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "esModuleInterop": false, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/tests/tsconfig.json", `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "esModuleInterop": true, + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go new file mode 100644 index 00000000000..48ed7b4bdfd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go @@ -0,0 +1,81 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "when input file text does not change but its modified time changes", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "upstream project changes without changing file text", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/index.ts", `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go new file mode 100644 index 00000000000..62d55c03a0a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go @@ -0,0 +1,73 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "when logic specifies tsBuildInfoFile", + CommandLineArgs: []string{"--b", "tests", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "tsBuildInfoFile": "ownFile.tsbuildinfo", + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_module_option_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_module_option_changes_test.go new file mode 100644 index 00000000000..4a6972f226b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_module_option_changes_test.go @@ -0,0 +1,82 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_when_module_option_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "when module option changes", + CommandLineArgs: []string{"--b", "core", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "module": "node18", + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "module": "nodenext", + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_target_option_changes_test.go b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_target_option_changes_test.go new file mode 100644 index 00000000000..04444c0168a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_sample_when_target_option_changes_test.go @@ -0,0 +1,90 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_sample_when_target_option_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "sample", + SubScenario: "when target option changes", + CommandLineArgs: []string{"--b", "core", "--verbose"}, + Cwd: "/user/username/projects/sample1", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.d.ts": `/// +/// `, + "/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts": `/// +/// `, + "/user/username/projects/sample1/core/anotherModule.ts": "export const World = \"hello\";", + "/user/username/projects/sample1/core/index.ts": `export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }`, + "/user/username/projects/sample1/core/some_decl.d.ts": "declare const dts: any;", + "/user/username/projects/sample1/core/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "listFiles": true, + "listEmittedFiles": true, + "target": "esnext", + }, +}`, + "/user/username/projects/sample1/logic/index.ts": `import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/logic/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +}`, + "/user/username/projects/sample1/tests/index.ts": `import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod;`, + "/user/username/projects/sample1/tests/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental-declaration-changes", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/sample1/core/tsconfig.json", `{ + "compilerOptions": { + "incremental": true, + "listFiles": true, + "listEmittedFiles": true, + "target": "es5", + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go b/internal/execute/tsctests/tests/Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go new file mode 100644 index 00000000000..acd018c09d0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go @@ -0,0 +1,43 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "solution", + SubScenario: "does not have empty files diagnostic when files is empty and references are provided", + CommandLineArgs: []string{"--b", "with-references"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/core/index.ts": "export function multiply(a: number, b: number) { return a * b; }", + "/home/src/workspaces/solution/core/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +}`, + "/home/src/workspaces/solution/with-references/tsconfig.json": `{ + "references": [ + { "path": "../core" }, + ], + "files": [], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go b/internal/execute/tsctests/tests/Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go new file mode 100644 index 00000000000..6d8842d51ff --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "solution", + SubScenario: "has empty files diagnostic when files is empty and no references are provided", + CommandLineArgs: []string{"--b", "no-references"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/no-references/tsconfig.json": `{ + "references": [], + "files": [], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go b/internal/execute/tsctests/tests/Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go new file mode 100644 index 00000000000..2fc2773383c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go @@ -0,0 +1,70 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "solution", + SubScenario: "verify that subsequent builds after initial build doesnt build anything", + CommandLineArgs: []string{"--b", "--v"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/src/folder/index.ts": "export const x = 10;", + "/home/src/workspaces/solution/src/folder/tsconfig.json": `{ + "files": ["index.ts"], + "compilerOptions": { + "composite": true + } +}`, + "/home/src/workspaces/solution/src/folder2/index.ts": "export const x = 10;", + "/home/src/workspaces/solution/src/folder2/tsconfig.json": `{ + "files": ["index.ts"], + "compilerOptions": { + "composite": true + } +}`, + "/home/src/workspaces/solution/src/tsconfig.json": ` { + "files": [], + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./folder" }, + { "path": "./folder2" }, + ] +}`, + "/home/src/workspaces/solution/tests/index.ts": "export const x = 10;", + "/home/src/workspaces/solution/tests/tsconfig.json": `{ + "files": ["index.ts"], + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "../src" } + ] +}`, + "/home/src/workspaces/solution/tsconfig.json": `{ + "files": [], + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./src" }, + { "path": "./tests" } + ] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_solution_when_solution_is_referenced_indirectly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_solution_when_solution_is_referenced_indirectly_test.go new file mode 100644 index 00000000000..a43386c0a2c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_solution_when_solution_is_referenced_indirectly_test.go @@ -0,0 +1,51 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_solution_when_solution_is_referenced_indirectly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "solution", + SubScenario: "when solution is referenced indirectly", + CommandLineArgs: []string{"--b", "project4", "--verbose", "--explainFiles"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project1/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [] +}`, + "/home/src/workspaces/solution/project2/src/b.ts": "export const b = 10;", + "/home/src/workspaces/solution/project2/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [] +}`, + "/home/src/workspaces/solution/project3/src/c.ts": "export const c = 10;", + "/home/src/workspaces/solution/project3/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "../project1" }, + { "path": "../project2" } + ] +}`, + "/home/src/workspaces/solution/project4/src/d.ts": "export const d = 10;", + "/home/src/workspaces/solution/project4/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../project3" }] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify project3 file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/solution/project3/src/c.ts", "export const cc = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_builds_correctly_test.go b/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_builds_correctly_test.go new file mode 100644 index 00000000000..329b09af05c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_builds_correctly_test.go @@ -0,0 +1,56 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_transitiveReferences_builds_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "transitiveReferences", + SubScenario: "builds correctly", + CommandLineArgs: []string{"--b", "tsconfig.c.json", "--listFiles"}, + Cwd: "/user/username/projects/transitiveReferences", + Files: tsctests.FileMap{ + "/user/username/projects/transitiveReferences/a.ts": "export class A {}", + "/user/username/projects/transitiveReferences/b.ts": `import {A} from '@ref/a'; +export const b = new A();`, + "/user/username/projects/transitiveReferences/c.ts": `import {b} from './b'; +import {X} from "@ref/a"; +b; +X;`, + "/user/username/projects/transitiveReferences/refs/a.d.ts": `export class X {} +export class A {}`, + "/user/username/projects/transitiveReferences/tsconfig.a.json": `{ + "files": ["a.ts"], + "compilerOptions": { + "composite": true, + }, +}`, + "/user/username/projects/transitiveReferences/tsconfig.b.json": `{ + "files": ["b.ts"], + "compilerOptions": { + "composite": true, + "paths": { + "@ref/*": ["./*"], + }, + }, + "references": [{ "path": "tsconfig.a.json" }], +}`, + "/user/username/projects/transitiveReferences/tsconfig.c.json": `{ + "files": ["c.ts"], + "compilerOptions": { + "paths": { + "@ref/*": ["./refs/*"], + }, + }, + "references": [{ "path": "tsconfig.b.json" }], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go b/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go new file mode 100644 index 00000000000..94c16429fb0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go @@ -0,0 +1,54 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "transitiveReferences", + SubScenario: "reports error about module not found with node resolution with external module name", + CommandLineArgs: []string{"--b", "tsconfig.c.json", "--listFiles"}, + Cwd: "/user/username/projects/transitiveReferences", + Files: tsctests.FileMap{ + "/user/username/projects/transitiveReferences/a.ts": "export class A {}", + "/user/username/projects/transitiveReferences/b.ts": `import {A} from 'a'; +export const b = new A();`, + "/user/username/projects/transitiveReferences/c.ts": `import {b} from './b'; +import {X} from "@ref/a"; +b; +X;`, + "/user/username/projects/transitiveReferences/refs/a.d.ts": `export class X {} +export class A {}`, + "/user/username/projects/transitiveReferences/tsconfig.a.json": `{ + "files": ["a.ts"], + "compilerOptions": { + "composite": true, + }, +}`, + "/user/username/projects/transitiveReferences/tsconfig.b.json": `{ + "files": ["b.ts"], + "compilerOptions": { + "composite": true, + "module": "nodenext", + }, + "references": [{ "path": "tsconfig.a.json" }], +}`, + "/user/username/projects/transitiveReferences/tsconfig.c.json": `{ + "files": ["c.ts"], + "compilerOptions": { + "paths": { + "@ref/*": ["./refs/*"], + }, + }, + "references": [{ "path": "tsconfig.b.json" }], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go new file mode 100644 index 00000000000..cc33599921d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects at-types package installed later", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import * as lib from \"untyped-lib\";", + "/home/src/workspaces/project/node_modules/untyped-lib/index.js": "module.exports = {};", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "install @types for the library", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/node_modules/@types/untyped-lib/index.d.ts", "declare module \"untyped-lib\" { export const value: string; }") + sys.WriteFile("/home/src/workspaces/project/node_modules/@types/untyped-lib/package.json", "{\"name\": \"@types/untyped-lib\", \"types\": \"index.d.ts\"}") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go new file mode 100644 index 00000000000..9a169097d79 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects change in symlinked file", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { shared } from \"./link\";", + "/home/src/workspaces/project/link.ts": vfstest.Symlink("/home/src/workspaces/shared/index.ts"), + "/home/src/workspaces/project/tsconfig.json": "{}", + "/home/src/workspaces/shared/index.ts": "export const shared = \"v1\";", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify symlink target", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/shared/index.ts", "export const shared = \"v2\";") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go new file mode 100644 index 00000000000..4ca3caed103 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go @@ -0,0 +1,34 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects file added in multiple new subdirectories simultaneously", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/a.ts": "export const a = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": {}, + "include": ["src/**/*.ts"] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "create multiple new subdirs with files", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/models/user.ts", "export interface User { name: string; }") + sys.WriteFile("/home/src/workspaces/project/src/utils/format.ts", "export function format(s: string): string { return s.trim(); }") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go new file mode 100644 index 00000000000..09f150b25cf --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects file added in new nested subdirectory", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/a.ts": "export const a = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": {}, + "include": ["src/**/*.ts"] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "create nested dir with ts file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/deep/nested/util.ts", "export const util = \"nested\";") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go new file mode 100644 index 00000000000..24c5cc11c93 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects file added to previously non-existent include path", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "const x = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": {}, + "include": ["index.ts", "src/**/*.ts"] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "create src dir with ts file matching include", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/helper.ts", "export const helper = \"added\";") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go new file mode 100644 index 00000000000..95d461a23df --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects file deleted and new file added simultaneously", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "import { b } from \"./b\";", + "/home/src/workspaces/project/b.ts": "export const b = 1;", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete b.ts and create c.ts with updated import", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/b.ts") + sys.WriteFile("/home/src/workspaces/project/a.ts", "import { c } from \"./c\";") + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c = 2;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go new file mode 100644 index 00000000000..ecc0bed52e2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go @@ -0,0 +1,41 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects file renamed and renamed back", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/helper.ts": "export const helper = 1;", + "/home/src/workspaces/project/index.ts": "import { helper } from \"./helper\";", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "rename helper to helper2", + ExpectedDiff: "incremental resolves to .js output from prior build while clean build cannot find module", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/helper.ts") + sys.WriteFile("/home/src/workspaces/project/helper2.ts", "export const helper = 1;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "rename back to helper", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/helper2.ts") + sys.WriteFile("/home/src/workspaces/project/helper.ts", "export const helper = 1;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go new file mode 100644 index 00000000000..d28d1a5ae72 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects import path restructured", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { util } from \"./lib/util\";", + "/home/src/workspaces/project/lib/util.ts": "export const util = \"v1\";", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "move file to new path and update import", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/lib/util.ts") + sys.WriteFile("/home/src/workspaces/project/index.ts", "import { util } from \"./src/util\";") + sys.WriteFile("/home/src/workspaces/project/src/util.ts", "export const util = \"v2\";") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go new file mode 100644 index 00000000000..5b89bca7ce9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects imported directory removed", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { util } from \"./lib/util\";", + "/home/src/workspaces/project/lib/util.ts": "export const util = \"hello\";", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "remove directory with imported file", + ExpectedDiff: "incremental resolves to .js output from prior build (TS7016) while clean build cannot find module at all (TS2307)", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/lib/util.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go new file mode 100644 index 00000000000..ff8109b4e29 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go @@ -0,0 +1,30 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects imported file added in new directory", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { util } from \"./lib/util\";", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "create directory and imported file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/lib/util.ts", "export const util = \"hello\";") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go new file mode 100644 index 00000000000..a46cfc91afa --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects module going missing then coming back", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { util } from \"./util\";", + "/home/src/workspaces/project/tsconfig.json": "{}", + "/home/src/workspaces/project/util.ts": "export const util = \"v1\";", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete util module", + ExpectedDiff: "incremental resolves to .js output from prior build while clean build cannot find module", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/util.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "recreate util module with new content", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/util.ts", "export const util = \"v2\";") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go new file mode 100644 index 00000000000..803696a939f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go @@ -0,0 +1,41 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects nested subdirectory removed and recreated", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/lib/helper.ts": "export const helper = \"v1\";", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": {}, + "include": ["src/**/*.ts"] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "remove nested dir", + ExpectedDiff: "incremental has prior state and does not report no-inputs error", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/src/lib/helper.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "recreate nested dir with new content", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/lib/helper.ts", "export const helper = \"v2\";") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go new file mode 100644 index 00000000000..60ae90488f9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects new file in existing include directory", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/a.ts": "export const a = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": {}, + "include": ["src/**/*.ts"] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "add new file to existing src directory", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/b.ts", "export const b = 2;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go new file mode 100644 index 00000000000..dfb2bd72851 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go @@ -0,0 +1,30 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects new file resolving failed import", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "import { b } from \"./b\";", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "create missing file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.ts", "export const b = 1;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go new file mode 100644 index 00000000000..3182972b4bf --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects node modules package added", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { lib } from \"mylib\";", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "install package in node_modules", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/node_modules/mylib/index.d.ts", "export declare const lib: string;") + sys.WriteFile("/home/src/workspaces/project/node_modules/mylib/index.js", "exports.lib = \"hello\";") + sys.WriteFile("/home/src/workspaces/project/node_modules/mylib/package.json", "{\"name\": \"mylib\", \"main\": \"index.js\", \"types\": \"index.d.ts\"}") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go new file mode 100644 index 00000000000..8add80f4f0c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go @@ -0,0 +1,35 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects node modules package removed", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { lib } from \"mylib\";", + "/home/src/workspaces/project/node_modules/mylib/index.d.ts": "export declare const lib: string;", + "/home/src/workspaces/project/node_modules/mylib/index.js": "exports.lib = \"hello\";", + "/home/src/workspaces/project/node_modules/mylib/package.json": "{\"name\": \"mylib\", \"main\": \"index.js\", \"types\": \"index.d.ts\"}", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "remove node_modules package", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/node_modules/mylib/index.d.ts") + sys.Remove("/home/src/workspaces/project/node_modules/mylib/index.js") + sys.Remove("/home/src/workspaces/project/node_modules/mylib/package.json") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go new file mode 100644 index 00000000000..059192d7681 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects package json types field edited", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { lib } from \"mylib\";", + "/home/src/workspaces/project/node_modules/mylib/new.d.ts": "export declare const lib: string;", + "/home/src/workspaces/project/node_modules/mylib/old.d.ts": "export declare const lib: number;", + "/home/src/workspaces/project/node_modules/mylib/package.json": "{\"name\": \"mylib\", \"types\": \"old.d.ts\"}", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "change package.json types field", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/node_modules/mylib/package.json", "{\"name\": \"mylib\", \"types\": \"new.d.ts\"}") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go new file mode 100644 index 00000000000..d2d5600ba94 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go @@ -0,0 +1,31 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch detects scoped package installed", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "import { lib } from \"@scope/mylib\";", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "install scoped package", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/node_modules/@scope/mylib/index.d.ts", "export declare const lib: string;") + sys.WriteFile("/home/src/workspaces/project/node_modules/@scope/mylib/package.json", "{\"name\": \"@scope/mylib\", \"types\": \"index.d.ts\"}") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go new file mode 100644 index 00000000000..d1c230aabcb --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go @@ -0,0 +1,31 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch handles file rapidly recreated", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/data.ts": "export const val = \"original\";", + "/home/src/workspaces/project/index.ts": "import { val } from \"./data\";", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete and immediately recreate with new content", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/data.ts", "export const val = \"recreated\";") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go new file mode 100644 index 00000000000..21a9cdd2d60 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go @@ -0,0 +1,31 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch handles tsconfig deleted", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "const x = 1;", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete tsconfig", + ExpectedDiff: "incremental reports config read error while clean build without tsconfig prints usage help", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/tsconfig.json") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go new file mode 100644 index 00000000000..424a2fda4a0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch handles tsconfig with extends base modified", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/base.json": `{ + "compilerOptions": { "strict": false } +}`, + "/home/src/workspaces/project/index.ts": "const x = null; const y: string = x;", + "/home/src/workspaces/project/tsconfig.json": `{ + "extends": "./base.json" +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify base config to enable strict", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/base.json", `{ + "compilerOptions": { "strict": true } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go new file mode 100644 index 00000000000..10a1ce4eeac --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go @@ -0,0 +1,30 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch rebuilds when file is modified", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "const x: number = 1;", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/index.ts", "const x: number = 2;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go new file mode 100644 index 00000000000..e6b764cc4fb --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch rebuilds when source file is deleted", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "import { b } from \"./b\";", + "/home/src/workspaces/project/b.ts": "export const b = 1;", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete imported file", + ExpectedDiff: "incremental resolves to .js output from prior build (TS7016) while clean build cannot find module at all (TS2307)", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/b.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go new file mode 100644 index 00000000000..96996af596e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch rebuilds when tsconfig include pattern adds file", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "const x = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": {}, + "include": ["*.ts"] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "widen include pattern to add src dir", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/extra.ts", "export const extra = 2;") + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": {}, + "include": ["*.ts", "src/**/*.ts"] +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go new file mode 100644 index 00000000000..c81b49d93f6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go @@ -0,0 +1,30 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch rebuilds when tsconfig is modified to change strict", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "const x = null; const y: string = x;", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "enable strict mode", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", "{\"compilerOptions\": {\"strict\": true}}") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go new file mode 100644 index 00000000000..ae9eb46037d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go @@ -0,0 +1,30 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch rebuilds when tsconfig is touched but content unchanged", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "const x = 1;", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "touch tsconfig without changing content", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", "{}") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go new file mode 100644 index 00000000000..aa21ee71368 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch skips build when no files change", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "const x: number = 1;", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go new file mode 100644 index 00000000000..add71ce8baa --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go @@ -0,0 +1,22 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_with_no_tsconfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch with no tsconfig", + CommandLineArgs: []string{"index.ts", "--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go new file mode 100644 index 00000000000..f600faba4b9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go @@ -0,0 +1,23 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch with tsconfig and incremental", + CommandLineArgs: []string{"--watch", "--incremental"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": "", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go new file mode 100644 index 00000000000..3f4d26187b7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go @@ -0,0 +1,34 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLineWatch", + SubScenario: "watch with tsconfig files list entry deleted", + CommandLineArgs: []string{"--watch"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = 1;", + "/home/src/workspaces/project/b.ts": "export const b = 2;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": {}, + "files": ["a.ts", "b.ts"] +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete file listed in files array", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/b.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go new file mode 100644 index 00000000000..525736b2734 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLine_Initialized_TSConfig_with_watch(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with --watch", + CommandLineArgs: []string{"--init", "--watch"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_test.go new file mode 100644 index 00000000000..26d2c71f522 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_test.go @@ -0,0 +1,28 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLine_Parse_watch_interval_option(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Parse watch interval option", + CommandLineArgs: []string{"-w", "--watchInterval", "1000"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/first.ts": "export const a = 1", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "noEmit": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go b/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go new file mode 100644 index 00000000000..0f324ac1ea7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Parse watch interval option without tsconfig.json", + CommandLineArgs: []string{"-w", "--watchInterval", "1000"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_test.go b/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_test.go new file mode 100644 index 00000000000..50eedd0158d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_test.go @@ -0,0 +1,88 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_noEmit_dts_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors", + CommandLineArgs: []string{"-w"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "const a = class { private p = 10; };", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "noEmit": true, + "declaration": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "declaration": true + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "noEmit": true, + "declaration": true + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "declaration": true + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "noEmit": true, + "declaration": true + } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_without_dts_enabled_test.go b/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_without_dts_enabled_test.go new file mode 100644 index 00000000000..764a9fdc348 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_without_dts_enabled_test.go @@ -0,0 +1,87 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_noEmit_dts_errors_without_dts_enabled(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled", + CommandLineArgs: []string{"-w"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "const a = class { private p = 10; };", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "noEmit": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "noEmit": true, + + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "noEmit": true, + + } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_semantic_errors_test.go b/internal/execute/tsctests/tests/Test_tscWatch_noEmit_semantic_errors_test.go new file mode 100644 index 00000000000..15498ee47a4 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_noEmit_semantic_errors_test.go @@ -0,0 +1,87 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_noEmit_semantic_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors", + CommandLineArgs: []string{"-w"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "const a: number = \"hello\"", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "noEmit": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "noEmit": true, + + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "noEmit": true, + + } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_syntax_errors_test.go b/internal/execute/tsctests/tests/Test_tscWatch_noEmit_syntax_errors_test.go new file mode 100644 index 00000000000..b35050c60a1 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tscWatch_noEmit_syntax_errors_test.go @@ -0,0 +1,87 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tscWatch_noEmit_syntax_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors", + CommandLineArgs: []string{"-w"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "const a = \"hello", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "noEmit": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no emit run after fixing error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "noEmit": true, + + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no emit run when error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "noEmit": true, + + } +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go new file mode 100644 index 00000000000..ef5ed64198b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Config with references and empty file and refers to config with noEmit", + CommandLineArgs: []string{"-p", "."}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/packages/pkg1/index.ts": "export const a = 1;", + "/home/src/workspaces/project/packages/pkg1/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "noEmit": true + }, + "files": [ + "./index.ts", + ], + }`, + "/home/src/workspaces/project/tsconfig.json": `{ + "files": [], + "references": [ + { + "path": "./packages/pkg1" + }, + ], + }`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go new file mode 100644 index 00000000000..25a630e81b2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with advanced options", + CommandLineArgs: []string{"--init", "--declaration", "--declarationDir", "lib", "--skipLibCheck", "--noErrorTruncation"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go new file mode 100644 index 00000000000..e033f307c91 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with boolean value compiler options", + CommandLineArgs: []string{"--init", "--noUnusedLocals"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go new file mode 100644 index 00000000000..29c6d242bd0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with enum value compiler options", + CommandLineArgs: []string{"--init", "--target", "es5", "--jsx", "react"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_files_options_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_files_options_test.go new file mode 100644 index 00000000000..ec4f8b6b790 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_files_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_files_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with files options", + CommandLineArgs: []string{"--init", "file0.st", "file1.ts", "file2.ts"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_help_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_help_test.go new file mode 100644 index 00000000000..e2499ab9bf7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_help_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_help(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with --help", + CommandLineArgs: []string{"--init", "--help"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go new file mode 100644 index 00000000000..eaab9f203f9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with incorrect compiler option", + CommandLineArgs: []string{"--init", "--someNonExistOption"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go new file mode 100644 index 00000000000..3f1a25e4316 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with incorrect compiler option value", + CommandLineArgs: []string{"--init", "--lib", "nonExistLib,es5,es2015.promise"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go new file mode 100644 index 00000000000..aa87783926d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with list compiler options", + CommandLineArgs: []string{"--init", "--types", "jquery,mocha"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go new file mode 100644 index 00000000000..4a27076a948 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with list compiler options with enum value", + CommandLineArgs: []string{"--init", "--lib", "es5,es2015.core"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go new file mode 100644 index 00000000000..582a99aac3e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go @@ -0,0 +1,28 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Initialized TSConfig with tsconfig.json", + CommandLineArgs: []string{"--init"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/first.ts": "export const a = 1", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "noEmit": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_enum_type_options_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_enum_type_options_test.go new file mode 100644 index 00000000000..833d7af806d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_enum_type_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Parse_enum_type_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Parse enum type options", + CommandLineArgs: []string{"--moduleResolution", "nodenext ", "first.ts", "--module", "nodenext", "--target", "esnext", "--moduleDetection", "auto", "--jsx", "react", "--newLine", "crlf"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_lib_option_with_file_name_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_lib_option_with_file_name_test.go new file mode 100644 index 00000000000..d6c453922b2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_lib_option_with_file_name_test.go @@ -0,0 +1,22 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Parse_lib_option_with_file_name(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Parse --lib option with file name", + CommandLineArgs: []string{"--lib", "es6 ", "first.ts"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/first.ts": "export const Key = Symbol()", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_test.go new file mode 100644 index 00000000000..95a16e19b2f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_test.go @@ -0,0 +1,28 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Parse_p(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Parse -p", + CommandLineArgs: []string{"-p", "."}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/first.ts": "export const a = 1", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "noEmit": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go new file mode 100644 index 00000000000..6e71887015d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go @@ -0,0 +1,28 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Parse -p with path to tsconfig file", + CommandLineArgs: []string{"-p", "/home/src/workspaces/project/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/first.ts": "export const a = 1", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "noEmit": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go new file mode 100644 index 00000000000..3f5389ee72d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go @@ -0,0 +1,28 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Parse -p with path to tsconfig folder", + CommandLineArgs: []string{"-p", "/home/src/workspaces/project"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/first.ts": "export const a = 1", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "noEmit": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Project_is_empty_string_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_Project_is_empty_string_test.go new file mode 100644 index 00000000000..bb3143c4f41 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_Project_is_empty_string_test.go @@ -0,0 +1,28 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_Project_is_empty_string(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "Project is empty string", + CommandLineArgs: []string{}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/first.ts": "export const a = 1", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "noEmit": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go new file mode 100644 index 00000000000..840d761b7f8 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go @@ -0,0 +1,21 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "adds color when FORCE_COLOR is set", + Env: map[string]string{ + "FORCE_COLOR": "true", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_bad_locale_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_bad_locale_test.go new file mode 100644 index 00000000000..69e3dfb792d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_bad_locale_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_bad_locale(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "bad locale", + CommandLineArgs: []string{"--locale", "whoops", "--version"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go new file mode 100644 index 00000000000..deb65072335 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go @@ -0,0 +1,22 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "does not add color when NO_COLOR is set even if FORCE_COLOR is set", + Env: map[string]string{ + "FORCE_COLOR": "true", + "NO_COLOR": "true", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go new file mode 100644 index 00000000000..376b0e81e75 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go @@ -0,0 +1,21 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "does not add color when NO_COLOR is set", + Env: map[string]string{ + "NO_COLOR": "true", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_help_all_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_help_all_test.go new file mode 100644 index 00000000000..150e7129da6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_help_all_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_help_all(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "help all", + CommandLineArgs: []string{"--help", "--all"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_help_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_help_test.go new file mode 100644 index 00000000000..d6563b50fa5 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_help_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_help(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "help", + CommandLineArgs: []string{"--help"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_locale_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_locale_test.go new file mode 100644 index 00000000000..dbb886d6281 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_locale_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_locale(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "locale", + CommandLineArgs: []string{"--locale", "cs", "--version"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go new file mode 100644 index 00000000000..844a3d56365 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go @@ -0,0 +1,21 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "show help with ExitStatus.DiagnosticsPresent_OutputsSkipped", + Env: map[string]string{ + "TS_TEST_TERMINAL_WIDTH": "120", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go b/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go new file mode 100644 index 00000000000..12c7b71115f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go @@ -0,0 +1,18 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "commandLine", + SubScenario: "show help with ExitStatus.DiagnosticsPresent_OutputsSkipped when host cannot provide terminal width", + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_converting_to_modules_test.go b/internal/execute/tsctests/tests/Test_tsc_composite_converting_to_modules_test.go new file mode 100644 index 00000000000..9620804c328 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_composite_converting_to_modules_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_composite_converting_to_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "composite", + SubScenario: "converting to modules", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/main.ts": "const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "none", + "composite": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "convert to modules", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "module": "es2015", + "composite": true, + }, +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go b/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go new file mode 100644 index 00000000000..28ed654d275 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "composite", + SubScenario: "synthetic jsx import of ESM module from CJS module error on jsx element", + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/node_modules/solid-js/jsx-runtime.d.ts": `export namespace JSX { + type IntrinsicElements = { div: {}; }; +}`, + "/home/src/projects/project/node_modules/solid-js/package.json": `{ + "name": "solid-js", + "type": "module" +}`, + "/home/src/projects/project/src/main.tsx": "export default
;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "Node16", + "jsx": "react-jsx", + "jsxImportSource": "solid-js", + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go b/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go new file mode 100644 index 00000000000..1b9b6ce27b8 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "composite", + SubScenario: "synthetic jsx import of ESM module from CJS module no crash no jsx element", + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/node_modules/solid-js/jsx-runtime.d.ts": `export namespace JSX { + type IntrinsicElements = { div: {}; }; +}`, + "/home/src/projects/project/node_modules/solid-js/package.json": `{ + "name": "solid-js", + "type": "module" +}`, + "/home/src/projects/project/src/main.ts": "export default 42;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "module": "Node16", + "jsx": "react-jsx", + "jsxImportSource": "solid-js", + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go b/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go new file mode 100644 index 00000000000..e699d4b6244 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "composite", + SubScenario: "when setting composite false and tsbuildinfo as null on command line but has tsbuild info in config", + CommandLineArgs: []string{"--composite", "false", "--tsBuildInfoFile", "null"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/main.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "composite": true, + "tsBuildInfoFile": "tsconfig.json.tsbuildinfo", + }, + "include": [ + "src/**/*.ts", + ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go b/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go new file mode 100644 index 00000000000..dbf4d970708 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "composite", + SubScenario: "when setting composite false on command line but has tsbuild info in config", + CommandLineArgs: []string{"--composite", "false"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/main.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "composite": true, + "tsBuildInfoFile": "tsconfig.json.tsbuildinfo", + }, + "include": [ + "src/**/*.ts", + ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_test.go b/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_test.go new file mode 100644 index 00000000000..5d918a3ee62 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_composite_when_setting_composite_false_on_command_line(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "composite", + SubScenario: "when setting composite false on command line", + CommandLineArgs: []string{"--composite", "false"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/main.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "composite": true, + }, + "include": [ + "src/**/*.ts", + ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_null_on_command_line_test.go b/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_null_on_command_line_test.go new file mode 100644 index 00000000000..606a4766448 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_null_on_command_line_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_composite_when_setting_composite_null_on_command_line(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "composite", + SubScenario: "when setting composite null on command line", + CommandLineArgs: []string{"--composite", "null"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/main.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "composite": true, + }, + "include": [ + "src/**/*.ts", + ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_test.go new file mode 100644 index 00000000000..5fcd5c56209 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_test.go @@ -0,0 +1,56 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_declarationEmit_reports_dts_generation_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "reports dts generation errors", + CommandLineArgs: []string{"--explainFiles", "--listEmittedFiles"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": `import ky from 'ky'; +export const api = ky.extend({});`, + "/home/src/workspaces/project/node_modules/ky/distribution/index.d.ts": `type KyInstance = { + extend(options: Record): KyInstance; +} +declare const ky: KyInstance; +export default ky;`, + "/home/src/workspaces/project/node_modules/ky/package.json": `{ + "name": "ky", + "type": "module", + "main": "./distribution/index.js" +}`, + "/home/src/workspaces/project/package.json": `{ + "type": "module" +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "composite": false, + "incremental": false, + "declaration": true, + "skipLibCheck": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "build -b", + CommandLineArgs: []string{"-b", "--explainFiles", "--listEmittedFiles", "--v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go new file mode 100644 index 00000000000..59d0428f4ff --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go @@ -0,0 +1,56 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "reports dts generation errors with incremental", + CommandLineArgs: []string{"--explainFiles", "--listEmittedFiles"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.ts": `import ky from 'ky'; +export const api = ky.extend({});`, + "/home/src/workspaces/project/node_modules/ky/distribution/index.d.ts": `type KyInstance = { + extend(options: Record): KyInstance; +} +declare const ky: KyInstance; +export default ky;`, + "/home/src/workspaces/project/node_modules/ky/package.json": `{ + "name": "ky", + "type": "module", + "main": "./distribution/index.js" +}`, + "/home/src/workspaces/project/package.json": `{ + "type": "module" +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "composite": true, + "incremental": true, + "declaration": true, + "skipLibCheck": true, + "skipDefaultLibCheck": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "build -b", + CommandLineArgs: []string{"-b", "--explainFiles", "--listEmittedFiles", "--v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go new file mode 100644 index 00000000000..9fc72d38374 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "when inferred export should reuse imported type alias across a module boundary", + CommandLineArgs: []string{"--p", "tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.es2022.full.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +type Partial = { + [K in keyof T]?: T[K]; +};`, + "/home/src/workspaces/project/a.ts": `interface ISettings { + age: number; +} + +export type Settings = Partial;`, + "/home/src/workspaces/project/factory.ts": `import type { Settings } from "./a"; + +export const makeObj = () => ({ + fn: (s?: Settings): Settings | undefined => s, +});`, + "/home/src/workspaces/project/state.ts": `import { makeObj } from "./factory"; + +export const obj = makeObj();`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "declaration": true, + "emitDeclarationOnly": true, + "target": "es2022", + "module": "esnext", + }, + "files": ["./a.ts", "./factory.ts", "./state.ts"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go new file mode 100644 index 00000000000..c1689b34641 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go @@ -0,0 +1,67 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "when pkg references sibling package through indirect symlink", + CommandLineArgs: []string{"-p", "pkg3", "--explainFiles"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/pkg1/dist/index.d.ts": "export * from './types';", + "/user/username/projects/myproject/pkg1/dist/types.d.ts": `export declare type A = { + id: string; +}; +export declare type B = { + id: number; +}; +export declare type IdType = A | B; +export declare class MetadataAccessor { + readonly key: string; + private constructor(); + toString(): string; + static create(key: string): MetadataAccessor; +}`, + "/user/username/projects/myproject/pkg1/package.json": `{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +}`, + "/user/username/projects/myproject/pkg2/dist/index.d.ts": "export * from './types';", + "/user/username/projects/myproject/pkg2/dist/types.d.ts": "export {MetadataAccessor} from '@raymondfeng/pkg1';", + "/user/username/projects/myproject/pkg2/node_modules/@raymondfeng/pkg1": vfstest.Symlink("/user/username/projects/myproject/pkg1"), + "/user/username/projects/myproject/pkg2/package.json": `{ + "name": "@raymondfeng/pkg2", + "version": "1.0.0", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +}`, + "/user/username/projects/myproject/pkg3/node_modules/@raymondfeng/pkg2": vfstest.Symlink("/user/username/projects/myproject/pkg2"), + "/user/username/projects/myproject/pkg3/src/index.ts": "export * from './keys';", + "/user/username/projects/myproject/pkg3/src/keys.ts": `import {MetadataAccessor} from "@raymondfeng/pkg2"; +export const ADMIN = MetadataAccessor.create('1');`, + "/user/username/projects/myproject/pkg3/tsconfig.json": `{ + "compilerOptions": { + "outDir": "dist", + "rootDir": "src", + "target": "es5", + "module": "commonjs", + "strict": true, + "esModuleInterop": true, + "declaration": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go new file mode 100644 index 00000000000..7f1a5f614ec --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go @@ -0,0 +1,91 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "when same version is referenced through source and another symlinked package", + CommandLineArgs: []string{"-p", "plugin-one", "--explainFiles"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/user/username/projects/myproject/plugin-one/action.ts": `import { actionCreatorFactory } from "typescript-fsa"; // Include version of shared lib +const action = actionCreatorFactory("somekey"); +const featureOne = action<{ route: string }>("feature-one"); +export const actions = { featureOne };`, + "/user/username/projects/myproject/plugin-one/index.ts": "import pluginTwo from \"plugin-two\"; // include this to add reference to symlink", + "/user/username/projects/myproject/plugin-one/node_modules/plugin-two": vfstest.Symlink("/user/username/projects/myproject/plugin-two"), + "/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/index.d.ts": `export interface Action { + type: string; + payload: Payload; +} +export declare type ActionCreator = { + type: string; + (payload: Payload): Action; +} +export interface ActionCreatorFactory { + (type: string): ActionCreator; +} +export declare function actionCreatorFactory(prefix?: string | null): ActionCreatorFactory; +export default actionCreatorFactory;`, + "/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/package.json": `{ + "name": "typescript-fsa", + "version": "3.0.0-beta-2" +}`, + "/user/username/projects/myproject/plugin-one/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "declaration": true, + "traceResolution": true, + }, +}`, + "/user/username/projects/myproject/plugin-two/index.d.ts": `declare const _default: { + features: { + featureOne: { + actions: { + featureOne: { + (payload: { + name: string; + order: number; + }, meta?: { + [key: string]: any; + }): import("typescript-fsa").Action<{ + name: string; + order: number; + }>; + }; + }; + path: string; + }; + }; +}; +export default _default;`, + "/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa/index.d.ts": `export interface Action { + type: string; + payload: Payload; +} +export declare type ActionCreator = { + type: string; + (payload: Payload): Action; +} +export interface ActionCreatorFactory { + (type: string): ActionCreator; +} +export declare function actionCreatorFactory(prefix?: string | null): ActionCreatorFactory; +export default actionCreatorFactory;`, + "/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa/package.json": `{ + "name": "typescript-fsa", + "version": "3.0.0-beta-2" +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go new file mode 100644 index 00000000000..6dc24863571 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go @@ -0,0 +1,97 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "when same version is referenced through source and another symlinked package with indirect link", + CommandLineArgs: []string{"-p", "plugin-one", "--explainFiles"}, + Cwd: "/user/username/projects/myproject", + Files: tsctests.FileMap{ + "/temp/yarn/data/link/plugin-two": vfstest.Symlink("/user/username/projects/myproject/plugin-two"), + "/user/username/projects/myproject/plugin-one/index.ts": `import pluginTwo from "plugin-two"; // include this to add reference to symlink +import { actionCreatorFactory } from "typescript-fsa"; // Include version of shared lib +const action = actionCreatorFactory("somekey"); +const featureOne = action<{ route: string }>("feature-one"); +export const actions = { featureOne };`, + "/user/username/projects/myproject/plugin-one/node_modules/plugin-two": vfstest.Symlink("/temp/yarn/data/link/plugin-two"), + "/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/index.d.ts": `export interface Action { + type: string; + payload: Payload; +} +export declare type ActionCreator = { + type: string; + (payload: Payload): Action; +} +export interface ActionCreatorFactory { + (type: string): ActionCreator; +} +export declare function actionCreatorFactory(prefix?: string | null): ActionCreatorFactory; +export default actionCreatorFactory;`, + "/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/package.json": `{ + "name": "typescript-fsa", + "version": "3.0.0-beta-2" +}`, + "/user/username/projects/myproject/plugin-one/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "declaration": true, + "traceResolution": true, + }, +}`, + "/user/username/projects/myproject/plugin-two/dist/commonjs/index.d.ts": `declare const _default: { + features: { + featureOne: { + actions: { + featureOne: { + (payload: { + name: string; + order: number; + }, meta?: { + [key: string]: any; + }): import("typescript-fsa").Action<{ + name: string; + order: number; + }>; + }; + }; + path: string; + }; + }; +}; +export default _default;`, + "/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa/index.d.ts": `export interface Action { + type: string; + payload: Payload; +} +export declare type ActionCreator = { + type: string; + (payload: Payload): Action; +} +export interface ActionCreatorFactory { + (type: string): ActionCreator; +} +export declare function actionCreatorFactory(prefix?: string | null): ActionCreatorFactory; +export default actionCreatorFactory;`, + "/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa/package.json": `{ + "name": "typescript-fsa", + "version": "3.0.0-beta-2" +}`, + "/user/username/projects/myproject/plugin-two/package.json": `{ + "name": "plugin-two", + "version": "0.1.3", + "main": "dist/commonjs/index.js" +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go new file mode 100644 index 00000000000..58542bf4cb2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go @@ -0,0 +1,60 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "declarationEmit", + SubScenario: "when using Windows paths and uppercase letters", + CommandLineArgs: []string{"-p", "D:\\Work\\pkg1", "--explainFiles"}, + Cwd: "D:/Work/pkg1", + IgnoreCase: true, + WindowsStyleRoot: "D:/", + Files: tsctests.FileMap{ + "D:/Work/pkg1/package.json": `{ + "name": "ts-specifier-bug", + "version": "1.0.0", + "main": "index.js" +}`, + "D:/Work/pkg1/src/main.ts": `import { PartialType } from './utils'; + +class Common {} + +export class Sub extends PartialType(Common) { + id: string; +}`, + "D:/Work/pkg1/src/utils/index.ts": `import { MyType, MyReturnType } from './type-helpers'; + +export function PartialType(classRef: MyType) { + abstract class PartialClassType { + constructor() {} + } + + return PartialClassType as MyReturnType; +}`, + "D:/Work/pkg1/src/utils/type-helpers.ts": `export type MyReturnType = { + new (...args: any[]): any; +}; + +export interface MyType extends Function { + new (...args: any[]): T; +}`, + "D:/Work/pkg1/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "target": "es2017", + "outDir": "./dist", + }, + "include": ["src"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_showConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_showConfig_test.go new file mode 100644 index 00000000000..50b50880241 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_showConfig_test.go @@ -0,0 +1,54 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_extends_configDir_template_showConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "extends", + SubScenario: "configDir template showConfig", + CommandLineArgs: []string{"--showConfig"}, + Cwd: "/home/src/projects/myproject", + Files: tsctests.FileMap{ + "/home/src/projects/configs/first/tsconfig.json": `{ + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["root1", "${configDir}/root2", "root3"], + "types": [], + }, +}`, + "/home/src/projects/configs/second/tsconfig.json": `{ + "files": ["${configDir}/main.ts"], + "compilerOptions": { + "declarationDir": "${configDir}/decls", + "paths": { + "@myscope/*": ["${configDir}/types/*"], + }, + }, + "watchOptions": { + "excludeFiles": ["${configDir}/main.ts"], + }, +}`, + "/home/src/projects/myproject/main.ts": `// some comment +export const y = 10; +import { x } from "@myscope/sometype";`, + "/home/src/projects/myproject/tsconfig.json": `{ + "extends": "../configs/first/tsconfig.json", + "compilerOptions": { + "declaration": true, + "outDir": "outDir", + "traceResolution": true, + }, +}`, + "/home/src/projects/myproject/types/sometype.ts": "export const x = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_test.go b/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_test.go new file mode 100644 index 00000000000..87ff75cda3a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_test.go @@ -0,0 +1,54 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_extends_configDir_template(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "extends", + SubScenario: "configDir template", + CommandLineArgs: []string{"--explainFiles"}, + Cwd: "/home/src/projects/myproject", + Files: tsctests.FileMap{ + "/home/src/projects/configs/first/tsconfig.json": `{ + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["root1", "${configDir}/root2", "root3"], + "types": [], + }, +}`, + "/home/src/projects/configs/second/tsconfig.json": `{ + "files": ["${configDir}/main.ts"], + "compilerOptions": { + "declarationDir": "${configDir}/decls", + "paths": { + "@myscope/*": ["${configDir}/types/*"], + }, + }, + "watchOptions": { + "excludeFiles": ["${configDir}/main.ts"], + }, +}`, + "/home/src/projects/myproject/main.ts": `// some comment +export const y = 10; +import { x } from "@myscope/sometype";`, + "/home/src/projects/myproject/tsconfig.json": `{ + "extends": "../configs/first/tsconfig.json", + "compilerOptions": { + "declaration": true, + "outDir": "outDir", + "traceResolution": true, + }, +}`, + "/home/src/projects/myproject/types/sometype.ts": "export const x = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_with_commandline_test.go b/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_with_commandline_test.go new file mode 100644 index 00000000000..f44e5255096 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_with_commandline_test.go @@ -0,0 +1,54 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_extends_configDir_template_with_commandline(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "extends", + SubScenario: "configDir template with commandline", + CommandLineArgs: []string{"--explainFiles", "--outDir", "${configDir}/outDir"}, + Cwd: "/home/src/projects/myproject", + Files: tsctests.FileMap{ + "/home/src/projects/configs/first/tsconfig.json": `{ + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["root1", "${configDir}/root2", "root3"], + "types": [], + }, +}`, + "/home/src/projects/configs/second/tsconfig.json": `{ + "files": ["${configDir}/main.ts"], + "compilerOptions": { + "declarationDir": "${configDir}/decls", + "paths": { + "@myscope/*": ["${configDir}/types/*"], + }, + }, + "watchOptions": { + "excludeFiles": ["${configDir}/main.ts"], + }, +}`, + "/home/src/projects/myproject/main.ts": `// some comment +export const y = 10; +import { x } from "@myscope/sometype";`, + "/home/src/projects/myproject/tsconfig.json": `{ + "extends": "../configs/first/tsconfig.json", + "compilerOptions": { + "declaration": true, + "outDir": "outDir", + "traceResolution": true, + }, +}`, + "/home/src/projects/myproject/types/sometype.ts": "export const x = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_extends_resolves_the_symlink_path_test.go b/internal/execute/tsctests/tests/Test_tsc_extends_resolves_the_symlink_path_test.go new file mode 100644 index 00000000000..e3aa640fe60 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_extends_resolves_the_symlink_path_test.go @@ -0,0 +1,38 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsc_extends_resolves_the_symlink_path(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "extends", + SubScenario: "resolves the symlink path", + CommandLineArgs: []string{"-p", "src", "--extendedDiagnostics"}, + Cwd: "/users/user/projects/myproject", + Files: tsctests.FileMap{ + "/users/user/projects/myconfigs/node_modules/@something/tsconfig-base/tsconfig.json": `{ + "compilerOptions": { "composite": true } +}`, + "/users/user/projects/myconfigs/node_modules/@something/tsconfig-node/tsconfig.json": `{ + "extends": "@something/tsconfig-base/tsconfig.json", + "compilerOptions": { + "removeComments": true + } +}`, + "/users/user/projects/myproject/node_modules/@something/tsconfig-node": vfstest.Symlink("/users/user/projects/myconfigs/node_modules/@something/tsconfig-node"), + "/users/user/projects/myproject/src/index.ts": `// some comment +export const x = 10;`, + "/users/user/projects/myproject/src/tsconfig.json": `{ + "extends": "@something/tsconfig-node/tsconfig.json" +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go new file mode 100644 index 00000000000..d38a0bbad21 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go @@ -0,0 +1,26 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "forceConsistentCasingInFileNames", + SubScenario: "two files exist on disk that differs only in casing", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/D.ts": "export const x = 10;", + "/home/src/workspaces/project/c.ts": "import {x} from \"./D\"", + "/home/src/workspaces/project/d.ts": "export const y = 20;", + "/home/src/workspaces/project/tsconfig.json": `{ + "files": ["c.ts", "d.ts"] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go new file mode 100644 index 00000000000..7f5433b2d0b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "forceConsistentCasingInFileNames", + SubScenario: "when file is included from multiple places with different casing", + CommandLineArgs: []string{"--explainFiles"}, + Cwd: "/home/src/projects/project", + IgnoreCase: true, + Files: tsctests.FileMap{ + "/home/src/projects/project/node_modules/fp-ts/lib/struct.d.ts": "export function foo(): void", + "/home/src/projects/project/src/anotherFile.ts": `import * as xs1 from "fp-ts/lib/Struct"; +import * as xs2 from "fp-ts/lib/struct"; +import * as xs3 from "./Struct"; +import * as xs4 from "./struct";`, + "/home/src/projects/project/src/oneMore.ts": `import * as xs1 from "fp-ts/lib/Struct"; +import * as xs2 from "fp-ts/lib/struct"; +import * as xs3 from "./Struct"; +import * as xs4 from "./struct";`, + "/home/src/projects/project/src/struct.d.ts": `import * as xs1 from "fp-ts/lib/Struct"; +import * as xs2 from "fp-ts/lib/struct"; +import * as xs3 from "./Struct"; +import * as xs4 from "./struct";`, + "/home/src/projects/project/tsconfig.json": "{}", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go new file mode 100644 index 00000000000..131f13696e2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go @@ -0,0 +1,28 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "forceConsistentCasingInFileNames", + SubScenario: "with relative and non relative file resolutions", + CommandLineArgs: []string{"/user/username/projects/myproject/src/struct.d.ts", "--forceConsistentCasingInFileNames", "--explainFiles"}, + Cwd: "/user/username/projects/myproject", + IgnoreCase: true, + Files: tsctests.FileMap{ + "/user/username/projects/myproject/node_modules/fp-ts/lib/struct.d.ts": "export function foo(): void", + "/user/username/projects/myproject/src/struct.d.ts": `import * as xs1 from "fp-ts/lib/Struct"; +import * as xs2 from "fp-ts/lib/struct"; +import * as xs3 from "./Struct"; +import * as xs4 from "./struct";`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go new file mode 100644 index 00000000000..458401dbd26 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go @@ -0,0 +1,24 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "forceConsistentCasingInFileNames", + SubScenario: "with triple slash ref from file", + IgnoreCase: true, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/c.ts": "/// ", + "/home/src/workspaces/project/src/d.ts": "declare class c { }", + "/home/src/workspaces/project/tsconfig.json": "{ }", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go new file mode 100644 index 00000000000..234095184bb --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "forceConsistentCasingInFileNames", + SubScenario: "with type ref from file", + CommandLineArgs: []string{"-p", "/user/username/projects/myproject", "--explainFiles", "--traceResolution"}, + Cwd: "/user/username/projects/myproject", + IgnoreCase: true, + Files: tsctests.FileMap{ + "/user/username/projects/myproject/src/file2.d.ts": `/// +declare const y: c;`, + "/user/username/projects/myproject/src/fileOne.d.ts": "declare class c { }", + "/user/username/projects/myproject/tsconfig.json": "{ }", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_generates_types_file_test.go b/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_generates_types_file_test.go new file mode 100644 index 00000000000..c44e4176c9b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_generates_types_file_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_generateTrace_generateTrace_generates_types_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "generateTrace", + SubScenario: "generateTrace generates types file", + CommandLineArgs: []string{"--generateTrace", "/home/src/workspaces/project/trace", "--singleThreaded"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": `interface Person { + name: string; + age: number; +} +const p: Person = { name: "Alice", age: 30 };`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "noEmit": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go b/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go new file mode 100644 index 00000000000..3925b099f04 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go @@ -0,0 +1,35 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "generateTrace", + SubScenario: "generateTrace with multiple files and complex types", + CommandLineArgs: []string{"--generateTrace", "/home/src/workspaces/project/trace", "--singleThreaded"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/main.ts": `import { Container, Nullable } from "./types"; +const c: Container = { value: 42, map: (fn) => ({ value: fn(42), map: c.map }) }; +const n: Nullable = "hello";`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "noEmit": true + } +}`, + "/home/src/workspaces/project/types.ts": `export interface Container { + value: T; + map(fn: (x: T) => U): Container; +} +export type Nullable = T | null | undefined;`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_test.go new file mode 100644 index 00000000000..6a636153bba --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_mixing_project_and_files(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "mixing project and files", + CommandLineArgs: []string{"-p", ".", "src/a.ts", "c.ts"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "include": ["src"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go new file mode 100644 index 00000000000..88c4e82173c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go @@ -0,0 +1,24 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "mixing project and files when config file absent", + CommandLineArgs: []string{"-p", ".", "src/a.ts", "c.ts"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go new file mode 100644 index 00000000000..5691fbcd862 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go @@ -0,0 +1,24 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "mixing project and files when config file absent with --ignoreConfig", + CommandLineArgs: []string{"-p", ".", "src/a.ts", "c.ts", "--ignoreConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go new file mode 100644 index 00000000000..5801435446b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "mixing project and files with --ignoreConfig", + CommandLineArgs: []string{"-p", ".", "src/a.ts", "c.ts", "--ignoreConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "include": ["src"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_test.go new file mode 100644 index 00000000000..5acfe42bc7a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_specifying_files(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "specifying files", + CommandLineArgs: []string{"src/a.ts"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "include": ["src"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go new file mode 100644 index 00000000000..87e4db96903 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go @@ -0,0 +1,24 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_specifying_files_when_config_file_absent(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "specifying files when config file absent", + CommandLineArgs: []string{"src/a.ts"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go new file mode 100644 index 00000000000..d71ec6a04d7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go @@ -0,0 +1,24 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "specifying files when config file absent with --ignoreConfig", + CommandLineArgs: []string{"src/a.ts", "--ignoreConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go new file mode 100644 index 00000000000..370fc5274c0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "specifying files with --ignoreConfig", + CommandLineArgs: []string{"src/a.ts", "--ignoreConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "include": ["src"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_test.go new file mode 100644 index 00000000000..8563e8d8527 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_specifying_project(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "specifying project", + CommandLineArgs: []string{"-p", "."}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "include": ["src"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go new file mode 100644 index 00000000000..d064e93238a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go @@ -0,0 +1,24 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_specifying_project_when_config_file_absent(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "specifying project when config file absent", + CommandLineArgs: []string{"-p", "."}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go new file mode 100644 index 00000000000..832802afc3e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go @@ -0,0 +1,24 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "specifying project when config file absent with --ignoreConfig", + CommandLineArgs: []string{"-p", ".", "--ignoreConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go new file mode 100644 index 00000000000..64d8c5c6fa5 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "specifying project with --ignoreConfig", + CommandLineArgs: []string{"-p", ".", "--ignoreConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "include": ["src"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_test.go new file mode 100644 index 00000000000..41a96858e3e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_test.go @@ -0,0 +1,26 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_without_any_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "without any options", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "include": ["src"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go new file mode 100644 index 00000000000..34caa40dbd2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go @@ -0,0 +1,23 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_without_any_options_when_config_file_absent(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "without any options when config file absent", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go new file mode 100644 index 00000000000..5765ef798a8 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go @@ -0,0 +1,24 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "without any options when config file absent with --ignoreConfig", + CommandLineArgs: []string{"--ignoreConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go new file mode 100644 index 00000000000..1f627ec2cea --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "ignoreConfig", + SubScenario: "without any options with --ignoreConfig", + CommandLineArgs: []string{"--ignoreConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/c.ts": "export const c = 10;", + "/home/src/workspaces/project/src/a.ts": "export const a = 10;", + "/home/src/workspaces/project/src/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "include": ["src"], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go new file mode 100644 index 00000000000..88a9685477c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go @@ -0,0 +1,52 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "Compile incremental with case insensitive file names", + CommandLineArgs: []string{"-p", "."}, + Cwd: "/home/project", + IgnoreCase: true, + Files: tsctests.FileMap{ + "/home/node_modules/lib1/index.d.ts": `import type { Foo } from 'someLib'; +export type { Foo as Foo1 };`, + "/home/node_modules/lib1/package.json": `{ + "name": "lib1" +}`, + "/home/node_modules/lib2/index.d.ts": `import type { Foo } from 'somelib'; +export type { Foo as Foo2 }; +export declare const foo2: Foo;`, + "/home/node_modules/lib2/package.json": `{ + "name": "lib2" +}`, + "/home/node_modules/otherLib/index.d.ts": "export type Str = string;", + "/home/node_modules/otherLib/package.json": `{ + "name": "otherlib" +}`, + "/home/node_modules/someLib/index.d.ts": `import type { Str } from 'otherLib'; +export type Foo = { foo: Str; };`, + "/home/node_modules/someLib/package.json": `{ + "name": "somelib" +}`, + "/home/project/src/index.ts": `import type { Foo1 } from 'lib1'; +import type { Foo2 } from 'lib2'; +export const foo1: Foo1 = { foo: "a" }; +export const foo2: Foo2 = { foo: "b" };`, + "/home/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_test.go new file mode 100644 index 00000000000..1cbd64e4b07 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_test.go @@ -0,0 +1,102 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_change_to_modifier_of_class_expression_field(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "change to modifier of class expression field", + CommandLineArgs: []string{"--incremental"}, + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +type ReturnType any> = T extends (...args: any) => infer R ? R : any; +type InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;`, + "/home/src/workspaces/project/MessageablePerson.ts": `const Messageable = () => { + return class MessageableClass { + public message = 'hello'; + } +}; +const wrapper = () => Messageable(); +type MessageablePerson = InstanceType>; +export default MessageablePerson;`, + "/home/src/workspaces/project/main.ts": `import MessageablePerson from './MessageablePerson.js'; +function logMessage( person: MessageablePerson ) { + console.log( person.message ); +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "esnext" + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify public to protected", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/MessageablePerson.ts", `const Messageable = () => { + return class MessageableClass { + protected message = 'hello'; + } +}; +const wrapper = () => Messageable(); +type MessageablePerson = InstanceType>; +export default MessageablePerson;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify protected to public", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/MessageablePerson.ts", `const Messageable = () => { + return class MessageableClass { + public message = 'hello'; + } +}; +const wrapper = () => Messageable(); +type MessageablePerson = InstanceType>; +export default MessageablePerson;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go new file mode 100644 index 00000000000..15dd6dae1fa --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go @@ -0,0 +1,103 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "change to modifier of class expression field with declaration emit enabled", + CommandLineArgs: []string{"--incremental"}, + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +type ReturnType any> = T extends (...args: any) => infer R ? R : any; +type InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;`, + "/home/src/workspaces/project/MessageablePerson.ts": `const Messageable = () => { + return class MessageableClass { + public message = 'hello'; + } +}; +const wrapper = () => Messageable(); +type MessageablePerson = InstanceType>; +export default MessageablePerson;`, + "/home/src/workspaces/project/main.ts": `import MessageablePerson from './MessageablePerson.js'; +function logMessage( person: MessageablePerson ) { + console.log( person.message ); +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "esnext", + "declaration": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify public to protected", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/MessageablePerson.ts", `const Messageable = () => { + return class MessageableClass { + protected message = 'hello'; + } +}; +const wrapper = () => Messageable(); +type MessageablePerson = InstanceType>; +export default MessageablePerson;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify protected to public", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/MessageablePerson.ts", `const Messageable = () => { + return class MessageableClass { + public message = 'hello'; + } +}; +const wrapper = () => Messageable(); +type MessageablePerson = InstanceType>; +export default MessageablePerson;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go new file mode 100644 index 00000000000..988990187ea --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go @@ -0,0 +1,36 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "change to type that gets used as global through export in another file", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/class1.ts": `const a: MagicNumber = 1; +console.log(a);`, + "/home/src/workspaces/project/constants.ts": "export default 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + "/home/src/workspaces/project/types.d.ts": "type MagicNumber = typeof import('./constants').default", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Modify imports used in global file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/constants.ts", "export default 2;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go new file mode 100644 index 00000000000..82e5b5ac19e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "change to type that gets used as global through export in another file through indirect import", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/class1.ts": `const a: MagicNumber = 1; +console.log(a);`, + "/home/src/workspaces/project/constants.ts": "export default 1;", + "/home/src/workspaces/project/reexport.ts": "export { default as ConstantNumber } from \"./constants\"", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + "/home/src/workspaces/project/types.d.ts": "type MagicNumber = typeof import('./reexport').ConstantNumber", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Modify imports used in global file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/constants.ts", "export default 2;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_in_different_file_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_in_different_file_test.go new file mode 100644 index 00000000000..be13986256c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_in_different_file_test.go @@ -0,0 +1,62 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_const_enums_aliased_in_different_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "const enums aliased in different file", + CommandLineArgs: []string{"-i", "a.ts", "--tsbuildinfofile", "a.tsbuildinfo"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": `import {A} from "./c" +let a = A.ONE`, + "/home/src/workspaces/project/b.d.ts": "export { AWorker as A } from \"./worker\";", + "/home/src/workspaces/project/c.ts": `import {A} from "./b" +let b = A.ONE +export {A}`, + "/home/src/workspaces/project/worker.d.ts": `export const enum AWorker { + ONE = 1 +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "change enum value", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/worker.d.ts", `export const enum AWorker { + ONE = 2 +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change enum value again", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/worker.d.ts", `export const enum AWorker { + ONE = 3 +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "something else changes in b.d.ts", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", "export { AWorker as A } from \"./worker\";export const randomThing = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "something else changes in b.d.ts again", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", "export { AWorker as A } from \"./worker\";export const randomThing = 10;export const randomThing2 = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_test.go new file mode 100644 index 00000000000..a44d0d62cc5 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_test.go @@ -0,0 +1,73 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_const_enums_aliased(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "const enums aliased", + CommandLineArgs: []string{"-i", "a.ts", "--tsbuildinfofile", "a.tsbuildinfo"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": `import {A} from "./c" +let a = A.ONE`, + "/home/src/workspaces/project/b.d.ts": `export const enum AWorker { + ONE = 1 +} +export { AWorker as A };`, + "/home/src/workspaces/project/c.ts": `import {A} from "./b" +let b = A.ONE +export {A}`, + "/home/src/workspaces/project/worker.d.ts": `export const enum AWorker { + ONE = 1 +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "change enum value", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", `export const enum AWorker { + ONE = 2 +} +export { AWorker as A };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change enum value again", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", `export const enum AWorker { + ONE = 3 +} +export { AWorker as A };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "something else changes in b.d.ts", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", `export const enum AWorker { + ONE = 3 +} +export { AWorker as A };export const randomThing = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "something else changes in b.d.ts again", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", `export const enum AWorker { + ONE = 3 +} +export { AWorker as A };export const randomThing = 10;export const randomThing2 = 10;`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_test.go new file mode 100644 index 00000000000..ba3586c5ad5 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_const_enums(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "const enums", + CommandLineArgs: []string{"-i", "a.ts", "--tsbuildinfofile", "a.tsbuildinfo"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": `import {A} from "./c" +let a = A.ONE`, + "/home/src/workspaces/project/b.d.ts": `export const enum A { + ONE = 1 +}`, + "/home/src/workspaces/project/c.ts": `import {A} from "./b" +let b = A.ONE +export {A}`, + "/home/src/workspaces/project/worker.d.ts": `export const enum AWorker { + ONE = 1 +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "change enum value", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", `export const enum A { + ONE = 2 +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change enum value again", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", `export const enum A { + ONE = 3 +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "something else changes in b.d.ts", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", `export const enum A { + ONE = 3 +}export const randomThing = 10;`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "something else changes in b.d.ts again", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/b.d.ts", `export const enum A { + ONE = 3 +}export const randomThing = 10;export const randomThing2 = 10;`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_with_refCycle_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_with_refCycle_test.go new file mode 100644 index 00000000000..47723ff8b18 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_with_refCycle_test.go @@ -0,0 +1,56 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_const_enums_with_refCycle(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "const enums with refCycle", + CommandLineArgs: []string{}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/aworker.ts": "export const AWorker = 10", + "/home/src/workspaces/project/b.ts": `import { AWorker } from "./aworker" +import { A as ACycle } from "./c" +export const enum A { + ONE = 1 +}`, + "/home/src/workspaces/project/c.ts": `import {A} from "./b" +let b = A.ONE +export {A}`, + "/home/src/workspaces/project/file.ts": `import {A} from "./c" +let a = A.ONE`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "change aworker", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/aworker.ts", "export const AWorker = 20") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "change aworker and enum value", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/aworker.ts", "export const AWorker = 30") + sys.WriteFile("/home/src/workspaces/project/b.ts", `import { AWorker } from "./aworker" +import { A as ACycle } from "./c" +export const enum A { + ONE = 2 +}`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_generates_typerefs_correctly_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_generates_typerefs_correctly_test.go new file mode 100644 index 00000000000..104ab328164 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_generates_typerefs_correctly_test.go @@ -0,0 +1,76 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_generates_typerefs_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "generates typerefs correctly", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/box.ts": `export interface Box { + unbox(): T +}`, + "/home/src/workspaces/project/src/bug.js": `import * as B from "./box.js" +import * as W from "./wrap.js" + +/** + * @template {object} C + * @param {C} source + * @returns {W.Wrap} + */ +const wrap = source => { +throw source +} + +/** + * @returns {B.Box} + */ +const box = (n = 0) => ({ unbox: () => n }) + +export const bug = wrap({ n: box(1) });`, + "/home/src/workspaces/project/src/wrap.ts": `export type Wrap = { + [K in keyof C]: { wrapped: C[K] } +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "outDir", + "checkJs": true + }, + "include": ["src"], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify js file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/bug.js", `import * as B from "./box.js" +import * as W from "./wrap.js" + +/** + * @template {object} C + * @param {C} source + * @returns {W.Wrap} + */ +const wrap = source => { +throw source +} + +/** + * @returns {B.Box} + */ +const box = (n = 0) => ({ unbox: () => n }) + +export const bug = wrap({ n: box(1) });export const something = 1;`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go new file mode 100644 index 00000000000..ca667403a5f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go @@ -0,0 +1,121 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_internal_symbolname_in_tsbuildInfo(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "internal symbolname in tsbuildInfo", + CommandLineArgs: []string{""}, + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.es2015.iterable.d.ts": `interface SymbolConstructor { + readonly iterator: unique symbol; +} +interface IteratorYieldResult { + done?: false; + value: TYield; +} +interface IteratorReturnResult { + done: true; + value: TReturn; +} +type IteratorResult = IteratorYieldResult | IteratorReturnResult; +interface Iterator { + // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. + next(...[value]: [] | [TNext]): IteratorResult; + return?(value?: TReturn): IteratorResult; + throw?(e?: any): IteratorResult; +} +interface Iterable { + [Symbol.iterator](): Iterator; +} +interface IterableIterator extends Iterator { + [Symbol.iterator](): IterableIterator; +} +interface IteratorObject extends Iterator { + [Symbol.iterator](): IteratorObject; +} +type BuiltinIteratorReturn = intrinsic; +interface ArrayIterator extends IteratorObject { + [Symbol.iterator](): ArrayIterator; +} +interface Array { + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, T]>; + keys(): ArrayIterator; + values(): ArrayIterator; +}`, + "/home/src/tslibs/TS/Lib/lib.es2017.full.d.ts": `/// +interface File { +} +interface FileList { + readonly length: number; + item(index: number): File | null; + [index: number]: File; + [Symbol.iterator](): ArrayIterator; +}/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; };`, + "/home/src/workspaces/project/a.ts": `const createFileListFromFiles = (files: File[]): FileList => { +const fileList: FileList = { + length: files.length, + item: (index: number): File | null => files[index] || null, + [Symbol.iterator]: function* (): IterableIterator { + for (const file of files) yield file; + }, + ...files, +} as unknown as FileList; + +return fileList; +};`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es2017", + "strict": true, + "esModuleInterop": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change with incremental", + CommandLineArgs: []string{"--incremental"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change with incremental that reads buildInfo", + CommandLineArgs: []string{"--incremental"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go new file mode 100644 index 00000000000..f80292f4159 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go @@ -0,0 +1,44 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "js file with import in jsdoc in composite project", + CommandLineArgs: []string{"--noEmit"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.js": `test("", async function () { + ;(/** @type {typeof import("a")} */ ({})) +}) + +test("", async function () { + ;(/** @type {typeof import("a")} */ a) +}) + +test("", async function () { + (/** @type {typeof import("a")} */ ({})) + ;(/** @type {typeof import("a")} */ ({})) +}) + +test("", async function () { + (/** @type {typeof import("a")} */ a) + ;(/** @type {typeof import("a")} */ a) +}) + +test("", async function () { + (/** @type {typeof import("a")} */ ({})) + ;(/** @type {typeof import("a")} */ ({})) +})`, + "/home/src/workspaces/project/tsconfig.json": "{\"compilerOptions\": {\"allowJs\": true, \"composite\": true}}", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_composite_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_composite_test.go new file mode 100644 index 00000000000..99b9044d8a6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_composite_test.go @@ -0,0 +1,103 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_option_changes_with_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "option changes with composite", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/project/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/project/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/project/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "with sourceMap", + CommandLineArgs: []string{"--sourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "should re-emit only js so they dont contain sourcemap", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration should not emit anything", + CommandLineArgs: []string{"--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap", + CommandLineArgs: []string{"--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "should re-emit only dts so they dont contain sourcemap", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with emitDeclarationOnly should not emit anything", + CommandLineArgs: []string{"--emitDeclarationOnly"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = 10;const aLocal = 100;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration should not emit anything", + CommandLineArgs: []string{"--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with inlineSourceMap", + CommandLineArgs: []string{"--inlineSourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with sourceMap", + CommandLineArgs: []string{"--sourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "declarationMap enabling", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.json", `{ + "compilerOptions": { + "composite": true, "declarationMap": true + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with sourceMap should not emit d.ts", + CommandLineArgs: []string{"--sourceMap"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_incremental_test.go new file mode 100644 index 00000000000..093e4ae2ecd --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_incremental_test.go @@ -0,0 +1,92 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_option_changes_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "option changes with incremental", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = 10;const aLocal = 10;", + "/home/src/workspaces/project/b.ts": "export const b = 10;const bLocal = 10;", + "/home/src/workspaces/project/c.ts": "import { a } from \"./a\";export const c = a;", + "/home/src/workspaces/project/d.ts": "import { b } from \"./b\";export const d = b;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "with sourceMap", + CommandLineArgs: []string{"--sourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "should re-emit only js so they dont contain sourcemap", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration, emit Dts and should not emit js", + CommandLineArgs: []string{"--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap", + CommandLineArgs: []string{"--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "local change", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = 10;const aLocal = 100;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap", + CommandLineArgs: []string{"--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with inlineSourceMap", + CommandLineArgs: []string{"--inlineSourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with sourceMap", + CommandLineArgs: []string{"--sourceMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "emit js files", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap", + CommandLineArgs: []string{"--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "with declaration and declarationMap, should not re-emit", + CommandLineArgs: []string{"--declaration", "--declarationMap"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go new file mode 100644 index 00000000000..cfb1e013796 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go @@ -0,0 +1,41 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "react-jsx-emit-mode with no backing types found doesnt crash", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/node_modules/@types/react/index.d.ts": `export {}; +declare global { + namespace JSX { + interface Element {} + interface IntrinsicElements { + div: { + propA?: boolean; + }; + } + } +}`, + "/home/src/workspaces/project/node_modules/react/jsx-runtime.js": "export {}", + "/home/src/workspaces/project/src/index.tsx": "export const App = () =>
;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "commonjs", + "jsx": "react-jsx", + "incremental": true, + "jsxImportSource": "react" + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go new file mode 100644 index 00000000000..6e7c758d909 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go @@ -0,0 +1,42 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "react-jsx-emit-mode with no backing types found doesnt crash under --strict", + CommandLineArgs: []string{"--strict"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/node_modules/@types/react/index.d.ts": `export {}; +declare global { + namespace JSX { + interface Element {} + interface IntrinsicElements { + div: { + propA?: boolean; + }; + } + } +}`, + "/home/src/workspaces/project/node_modules/react/jsx-runtime.js": "export {}", + "/home/src/workspaces/project/src/index.tsx": "export const App = () =>
;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "commonjs", + "jsx": "react-jsx", + "incremental": true, + "jsxImportSource": "react" + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_composite_project_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_composite_project_test.go new file mode 100644 index 00000000000..0f5593707a8 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_composite_project_test.go @@ -0,0 +1,29 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_serializing_composite_project(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "serializing composite project", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.tsx": "export const a = 1;", + "/home/src/workspaces/project/other.ts": "export const b = 2;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "strict": true, + "module": "esnext", + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_error_chain_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_error_chain_test.go new file mode 100644 index 00000000000..069e26ff459 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_error_chain_test.go @@ -0,0 +1,45 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_serializing_error_chain(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "serializing error chain", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/index.tsx": `declare namespace JSX { + interface ElementChildrenAttribute { children: {}; } + interface IntrinsicElements { div: {} } +} + +declare var React: any; + +declare function Component(props: never): any; +declare function Component(props: { children?: number }): any; +( +
+
+)`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "strict": true, + "jsx": "react", + "module": "esnext", + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_tsbuildinfo_has_error_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_tsbuildinfo_has_error_test.go new file mode 100644 index 00000000000..fcd0d8b35c0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_tsbuildinfo_has_error_test.go @@ -0,0 +1,31 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_tsbuildinfo_has_error(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "tsbuildinfo has error", + CommandLineArgs: []string{"-i"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/main.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": "{}", + "/home/src/workspaces/project/tsconfig.tsbuildinfo": "Some random string", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "tsbuildinfo written has error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/tsconfig.tsbuildinfo", "Some random string{\"version\":\"FakeTSVersion\",\"root\":[2],\"fileNames\":[\"lib.es2025.full.d.ts\",\"./main.ts\"],\"fileInfos\":[{\"version\":\"8859c12c614ce56ba9a18e58384a198f-/// \\ninterface Boolean {}\\ninterface Function {}\\ninterface CallableFunction {}\\ninterface NewableFunction {}\\ninterface IArguments {}\\ninterface Number { toExponential: any; }\\ninterface Object {}\\ninterface RegExp {}\\ninterface String { charAt: any; }\\ninterface Array { length: number; [n: number]: T; }\\ninterface ReadonlyArray {}\\ninterface SymbolConstructor {\\n (desc?: string | number): symbol;\\n for(name: string): symbol;\\n readonly toStringTag: symbol;\\n}\\ndeclare var Symbol: SymbolConstructor;\\ninterface Symbol {\\n readonly [Symbol.toStringTag]: string;\\n}\\ndeclare const console: { log(msg: any): void; };\",\"affectsGlobalScope\":true,\"impliedNodeFormat\":1},\"28e8748a7acd58f4f59388926e914f86-export const x = 10;\"]}") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_file_is_deleted_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_when_file_is_deleted_test.go new file mode 100644 index 00000000000..3511ab18147 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_when_file_is_deleted_test.go @@ -0,0 +1,35 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_when_file_is_deleted(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "when file is deleted", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/file1.ts": "export class C { }", + "/home/src/workspaces/project/file2.ts": "export class D { }", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "outDir" + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete file with imports", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/file2.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go new file mode 100644 index 00000000000..a348c14b07e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go @@ -0,0 +1,82 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "when global file is added, the signatures are updated", + CommandLineArgs: []string{}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/anotherFileWithSameReferenes.ts": `/// +/// +function anotherFileWithSameReferenes() { }`, + "/home/src/workspaces/project/src/filePresent.ts": "function something() { return 10; }", + "/home/src/workspaces/project/src/main.ts": `/// +/// +function main() { }`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "composite": true }, + "include": ["src/**/*.ts"], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Modify main file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/main.ts", `/// +/// +function main() { }something();`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Modify main file again", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/main.ts", `/// +/// +function main() { }something();something();`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add new file and update main file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/main.ts", `/// +/// +/// +function main() { }something();something();foo();`) + sys.WriteFile("/home/src/workspaces/project/src/newFile.ts", "function foo() { return 20; }") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Write file that could not be resolved", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/fileNotFound.ts", "function something2() { return 20; }") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Modify main file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/main.ts", `/// +/// +/// +function main() { }something();something();foo();something();`) + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go new file mode 100644 index 00000000000..e571c9e1e7a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go @@ -0,0 +1,35 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "when passing filename for buildinfo on commandline", + CommandLineArgs: []string{"--incremental", "--tsBuildInfoFile", ".tsbuildinfo", "--explainFiles"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/main.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "module": "commonjs" + }, + "include": [ + "src/**/*.ts" + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_from_commandline_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_from_commandline_test.go new file mode 100644 index 00000000000..ebb629c0f00 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_from_commandline_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_when_passing_rootDir_from_commandline(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "when passing rootDir from commandline", + CommandLineArgs: []string{"--rootDir", "src"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/main.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "outDir": "dist" + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go new file mode 100644 index 00000000000..db4174b1c74 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "when passing rootDir is in the tsconfig", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/main.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "outDir": "dist", + "rootDir": "./" + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go new file mode 100644 index 00000000000..19eec0ea67f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go @@ -0,0 +1,42 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "when there is bind diagnostics thats ignored", + CommandLineArgs: []string{""}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = 10;", + "/home/src/workspaces/project/b.d.ts": `interface NoName { + Profiler: new ({ sampleInterval: number, maxBufferSize: number }) => { + stop: () => Promise; + }; +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "skipLibCheck": true, + "incremental": true, + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change and tsc -b", + CommandLineArgs: []string{"-b", "-v"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_with_only_dts_files_test.go b/internal/execute/tsctests/tests/Test_tsc_incremental_with_only_dts_files_test.go new file mode 100644 index 00000000000..2846c2b22e2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_incremental_with_only_dts_files_test.go @@ -0,0 +1,35 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_incremental_with_only_dts_files(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "incremental", + SubScenario: "with only dts files", + CommandLineArgs: []string{"--incremental"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/another.d.ts": "export const y = 10;", + "/home/src/workspaces/project/src/main.d.ts": "export const x = 10;", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "modify d.ts file", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/main.d.ts", "export const x = 10;export const xy = 100;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_unknown_lib_test.go b/internal/execute/tsctests/tests/Test_tsc_libraryResolution_unknown_lib_test.go new file mode 100644 index 00000000000..5882277b0f2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_libraryResolution_unknown_lib_test.go @@ -0,0 +1,38 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_libraryResolution_unknown_lib(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "libraryResolution", + SubScenario: "unknown lib", + CommandLineArgs: []string{"-p", "project1", "--explainFiles"}, + Cwd: "/home/src/workspace/projects", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.scripthost.d.ts": "interface ScriptHostInterface { }", + "/home/src/tslibs/TS/Lib/lib.webworker.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/project1/core.d.ts": "export const core = 10;", + "/home/src/workspace/projects/project1/file.ts": "export const file = 10;", + "/home/src/workspace/projects/project1/file2.ts": `/// +/// +/// `, + "/home/src/workspace/projects/project1/index.ts": "export const x = \"type1\";", + "/home/src/workspace/projects/project1/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project1/utils.d.ts": "export const y = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_when_noLib_toggles_test.go b/internal/execute/tsctests/tests/Test_tsc_libraryResolution_when_noLib_toggles_test.go new file mode 100644 index 00000000000..c1f0c0f39b7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_libraryResolution_when_noLib_toggles_test.go @@ -0,0 +1,34 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_libraryResolution_when_noLib_toggles(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "libraryResolution", + SubScenario: "when noLib toggles", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.d.ts": "declare const a = \"hello\";", + "/home/src/workspaces/project/b.ts": "const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": true, + "lib": ["es6"], + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "with --noLib", + CommandLineArgs: []string{"--noLib"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_test.go b/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_test.go new file mode 100644 index 00000000000..bd1504fc38e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_test.go @@ -0,0 +1,73 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_libraryResolution_with_config(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "libraryResolution", + SubScenario: "with config", + CommandLineArgs: []string{"-p", "project1", "--explainFiles"}, + Cwd: "/home/src/workspace/projects", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.dom.d.ts": "interface DOMInterface { }", + "/home/src/tslibs/TS/Lib/lib.scripthost.d.ts": "interface ScriptHostInterface { }", + "/home/src/tslibs/TS/Lib/lib.webworker.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/unlreated/index.d.ts": "export const unrelated = 10;", + "/home/src/workspace/projects/project1/core.d.ts": "export const core = 10;", + "/home/src/workspace/projects/project1/file.ts": "export const file = 10;", + "/home/src/workspace/projects/project1/file2.ts": `/// +/// +/// `, + "/home/src/workspace/projects/project1/index.ts": "export const x = \"type1\";", + "/home/src/workspace/projects/project1/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot1"], + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts": "export type TheNum = \"type1\";", + "/home/src/workspace/projects/project1/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project2/index.ts": "export const y = 10", + "/home/src/workspace/projects/project2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project2/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project3/index.ts": "export const z = 10", + "/home/src/workspace/projects/project3/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project3/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project4/index.ts": "export const z = 10", + "/home/src/workspace/projects/project4/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["esnext", "dom", "webworker"], + "traceResolution": true, + "libReplacement": false + } +}`, + "/home/src/workspace/projects/project4/utils.d.ts": "export const y = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_with_libReplacement_test.go b/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_with_libReplacement_test.go new file mode 100644 index 00000000000..45a47fed33e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_with_libReplacement_test.go @@ -0,0 +1,120 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_libraryResolution_with_config_with_libReplacement(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "libraryResolution", + SubScenario: "with config with libReplacement", + CommandLineArgs: []string{"-p", "project1", "--explainFiles"}, + Cwd: "/home/src/workspace/projects", + Files: tsctests.FileMap{ + "/home/src/tslibs/TS/Lib/lib.dom.d.ts": "interface DOMInterface { }", + "/home/src/tslibs/TS/Lib/lib.scripthost.d.ts": "interface ScriptHostInterface { }", + "/home/src/tslibs/TS/Lib/lib.webworker.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts": "interface DOMInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; };`, + "/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.d.ts": `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; };`, + "/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.d.ts": "interface ScriptHostInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts": "interface WebWorkerInterface { }", + "/home/src/workspace/projects/node_modules/@typescript/unlreated/index.d.ts": "export const unrelated = 10;", + "/home/src/workspace/projects/project1/core.d.ts": "export const core = 10;", + "/home/src/workspace/projects/project1/file.ts": "export const file = 10;", + "/home/src/workspace/projects/project1/file2.ts": `/// +/// +/// `, + "/home/src/workspace/projects/project1/index.ts": "export const x = \"type1\";", + "/home/src/workspace/projects/project1/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot1"], + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts": "export type TheNum = \"type1\";", + "/home/src/workspace/projects/project1/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project2/index.ts": "export const y = 10", + "/home/src/workspace/projects/project2/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project2/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project3/index.ts": "export const z = 10", + "/home/src/workspace/projects/project3/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project3/utils.d.ts": "export const y = 10;", + "/home/src/workspace/projects/project4/index.ts": "export const z = 10", + "/home/src/workspace/projects/project4/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "lib": ["esnext", "dom", "webworker"], + "traceResolution": true, + "libReplacement": true + } +}`, + "/home/src/workspace/projects/project4/utils.d.ts": "export const y = 10;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_combined_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_combined_with_incremental_test.go new file mode 100644 index 00000000000..8b4b73db23e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_combined_with_incremental_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_listFilesOnly_combined_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "listFilesOnly", + SubScenario: "combined with incremental", + CommandLineArgs: []string{"--incremental", "--listFilesOnly"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/test.ts": "export const x = 1;", + "/home/src/workspaces/project/tsconfig.json": "{}", + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental actual build", + CommandLineArgs: []string{"--incremental"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "incremental should not build", + CommandLineArgs: []string{"--incremental"}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_loose_file_test.go b/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_loose_file_test.go new file mode 100644 index 00000000000..0bd312ce078 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_loose_file_test.go @@ -0,0 +1,22 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_listFilesOnly_loose_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "listFilesOnly", + SubScenario: "loose file", + CommandLineArgs: []string{"test.ts", "--listFilesOnly"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/test.ts": "export const x = 1;", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_moduleResolution_alternateResult_test.go b/internal/execute/tsctests/tests/Test_tsc_moduleResolution_alternateResult_test.go new file mode 100644 index 00000000000..e75cdc020d6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_moduleResolution_alternateResult_test.go @@ -0,0 +1,250 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_moduleResolution_alternateResult(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "alternateResult", + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/index.mts": `import { foo } from "foo"; +import { bar } from "bar"; +import { foo2 } from "foo2"; +import { bar2 } from "bar2";`, + "/home/src/projects/project/node_modules/@types/bar/index.d.ts": "export declare const bar: number;", + "/home/src/projects/project/node_modules/@types/bar/package.json": `{ + "name": "@types/bar", + "version": "1.0.0", + "types": "index.d.ts", + "exports": { + ".": { + + "require": "./index.d.ts" + } + } +}`, + "/home/src/projects/project/node_modules/@types/bar2/index.d.ts": "export declare const bar2: number;", + "/home/src/projects/project/node_modules/@types/bar2/package.json": `{ + "name": "@types/bar2", + "version": "1.0.0", + "types": "index.d.ts", + "exports": { + ".": { + "types": "./index.d.ts", + "require": "./index.d.ts" + } + } +}`, + "/home/src/projects/project/node_modules/bar/index.js": "module.exports = { bar: 1 };", + "/home/src/projects/project/node_modules/bar/index.mjs": "export const bar = 1;", + "/home/src/projects/project/node_modules/bar/package.json": `{ + "name": "bar", + "version": "1.0.0", + "main": "index.js", + + "exports": { + ".": { + + "import": "./index.mjs", + "require": "./index.js" + } + } +}`, + "/home/src/projects/project/node_modules/bar2/index.js": "module.exports = { bar2: 1 };", + "/home/src/projects/project/node_modules/bar2/index.mjs": "export const bar2 = 1;", + "/home/src/projects/project/node_modules/bar2/package.json": `{ + "name": "bar2", + "version": "1.0.0", + "main": "index.js", + + "exports": { + ".": { + + "import": "./index.mjs", + "require": "./index.js" + } + } +}`, + "/home/src/projects/project/node_modules/foo/index.d.ts": "export declare const foo: number;", + "/home/src/projects/project/node_modules/foo/index.js": "module.exports = { foo: 1 };", + "/home/src/projects/project/node_modules/foo/index.mjs": "export const foo = 1;", + "/home/src/projects/project/node_modules/foo/package.json": `{ + "name": "foo", + "version": "1.0.0", + "main": "index.js", + "types": "index.d.ts", + "exports": { + ".": { + + "import": "./index.mjs", + "require": "./index.js" + } + } +}`, + "/home/src/projects/project/node_modules/foo2/index.d.ts": "export declare const foo2: number;", + "/home/src/projects/project/node_modules/foo2/index.js": "module.exports = { foo2: 1 };", + "/home/src/projects/project/node_modules/foo2/index.mjs": "export const foo2 = 1;", + "/home/src/projects/project/node_modules/foo2/package.json": `{ + "name": "foo2", + "version": "1.0.0", + "main": "index.js", + "types": "index.d.ts", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.mjs", + "require": "./index.js" + } + } +}`, + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "module": "node16", + "moduleResolution": "node16", + "traceResolution": true, + "incremental": true, + "strict": true, + "types": [], + }, + "files": ["index.mts"], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete the alternateResult in @types", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/projects/project/node_modules/@types/bar/index.d.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete the node10Result in package/types", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/projects/project/node_modules/foo/index.d.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "add the alternateResult in @types", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts", "export declare const bar: number;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "add the alternateResult in package/types", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/node_modules/foo/index.d.ts", "export declare const foo: number;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "update package.json from @types so error is fixed", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/node_modules/@types/bar/package.json", `{ + "name": "@types/bar", + "version": "1.0.0", + "types": "index.d.ts", + "exports": { + ".": { + "types": "./index.d.ts", + "require": "./index.d.ts" + } + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "update package.json so error is fixed", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/node_modules/foo/package.json", `{ + "name": "foo", + "version": "1.0.0", + "main": "index.js", + "types": "index.d.ts", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.mjs", + "require": "./index.js" + } + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "update package.json from @types so error is introduced", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/node_modules/@types/bar2/package.json", `{ + "name": "@types/bar2", + "version": "1.0.0", + "types": "index.d.ts", + "exports": { + ".": { + + "require": "./index.d.ts" + } + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "update package.json so error is introduced", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/node_modules/foo2/package.json", `{ + "name": "foo2", + "version": "1.0.0", + "main": "index.js", + "types": "index.d.ts", + "exports": { + ".": { + + "import": "./index.mjs", + "require": "./index.js" + } + } +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete the alternateResult in @types", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/projects/project/node_modules/@types/bar2/index.d.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete the node10Result in package/types", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/projects/project/node_modules/foo2/index.d.ts") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "add the alternateResult in @types", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", "export declare const bar2: number;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "add the ndoe10Result in package/types", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/node_modules/foo2/index.d.ts", "export declare const foo2: number;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_moduleResolution_package_json_scope_test.go b/internal/execute/tsctests/tests/Test_tsc_moduleResolution_package_json_scope_test.go new file mode 100644 index 00000000000..bf2dec6cf5b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_moduleResolution_package_json_scope_test.go @@ -0,0 +1,49 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_moduleResolution_package_json_scope(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "package json scope", + CommandLineArgs: []string{"-p", "src", "--explainFiles", "--extendedDiagnostics"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/package.json": `{ + "name": "app", + "version": "1.0.0" +}`, + "/home/src/workspaces/project/src/fileA.ts": `import { foo } from "./fileB.mjs"; +foo();`, + "/home/src/workspaces/project/src/fileB.mts": "export function foo() {}", + "/home/src/workspaces/project/src/main.ts": "export const x = 10;", + "/home/src/workspaces/project/src/tsconfig.json": `{ + "compilerOptions": { + "target": "ES2016", + "composite": true, + "module": "Node16", + "traceResolution": true, + }, + "files": [ + "main.ts", + "fileA.ts", + "fileB.mts", + ], +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "Delete package.json", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/package.json") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_moduleResolution_pnpm_style_layout_test.go b/internal/execute/tsctests/tests/Test_tsc_moduleResolution_pnpm_style_layout_test.go new file mode 100644 index 00000000000..08498806534 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_moduleResolution_pnpm_style_layout_test.go @@ -0,0 +1,117 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" +) + +func Test_tsc_moduleResolution_pnpm_style_layout(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "moduleResolution", + SubScenario: "pnpm style layout", + CommandLineArgs: []string{"--traceResolution", "--explainFiles"}, + Cwd: "/home/src/projects/component-type-checker/packages/app", + Files: tsctests.FileMap{ + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+button@0.0.1/node_modules/@component-type-checker/button/package.json": `{ + "name": "@component-type-checker/button", + "version": "0.0.1", + "main": "./src/index.ts" +}`, + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+button@0.0.1/node_modules/@component-type-checker/button/src/index.ts": `export interface Button { + a: number; + b: number; +} +export function createButton(): Button { + return { + a: 0, + b: 1, + }; +}`, + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+button@0.0.2/node_modules/@component-type-checker/button/package.json": `{ + "name": "@component-type-checker/button", + "version": "0.0.2", + "main": "./src/index.ts" +}`, + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+button@0.0.2/node_modules/@component-type-checker/button/src/index.ts": `export interface Button { + a: number; + c: number; +} +export function createButton(): Button { + return { + a: 0, + c: 2, + }; +}`, + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.1/node_modules/@component-type-checker/button": vfstest.Symlink("/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+button@0.0.1/node_modules/@component-type-checker/button"), + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.1/node_modules/@component-type-checker/components/package.json": `{ + "name": "@component-type-checker/components", + "version": "0.0.1", + "main": "./src/index.ts", + "peerDependencies": { + "@component-type-checker/button": "*" + }, + "devDependencies": { + "@component-type-checker/button": "0.0.2" + } +}`, + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.1/node_modules/@component-type-checker/components/src/index.ts": "export { createButton, Button } from \"@component-type-checker/button\";", + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.2/node_modules/@component-type-checker/button": vfstest.Symlink("/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+button@0.0.2/node_modules/@component-type-checker/button"), + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.2/node_modules/@component-type-checker/components/package.json": `{ + "name": "@component-type-checker/components", + "version": "0.0.1", + "main": "./src/index.ts", + "peerDependencies": { + "@component-type-checker/button": "*" + }, + "devDependencies": { + "@component-type-checker/button": "0.0.2" + } +}`, + "/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.2/node_modules/@component-type-checker/components/src/index.ts": "export { createButton, Button } from \"@component-type-checker/button\";", + "/home/src/projects/component-type-checker/packages/app/node_modules/@component-type-checker/button": vfstest.Symlink("/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+button@0.0.2/node_modules/@component-type-checker/button"), + "/home/src/projects/component-type-checker/packages/app/node_modules/@component-type-checker/components": vfstest.Symlink("/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.2/node_modules/@component-type-checker/components"), + "/home/src/projects/component-type-checker/packages/app/node_modules/@component-type-checker/sdk": vfstest.Symlink("/home/src/projects/component-type-checker/packages/sdk"), + "/home/src/projects/component-type-checker/packages/app/package.json": `{ + "name": "app", + "version": "1.0.0", + "dependencies": { + "@component-type-checker/button": "0.0.2", + "@component-type-checker/components": "0.0.1", + "@component-type-checker/sdk": "0.0.2" + } +}`, + "/home/src/projects/component-type-checker/packages/app/src/app.tsx": `import { VERSION } from "@component-type-checker/sdk"; +import { Button } from "@component-type-checker/components"; +import { createButton } from "@component-type-checker/button"; +const button: Button = createButton();`, + "/home/src/projects/component-type-checker/packages/app/tsconfig.json": `{ + "compilerOptions": { + "target": "es5", + "module": "esnext", + "lib": ["ES5"], + "outDir": "dist", + }, + "include": ["src"], +}`, + "/home/src/projects/component-type-checker/packages/sdk/node_modules/@component-type-checker/button": vfstest.Symlink("/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+button@0.0.1/node_modules/@component-type-checker/button"), + "/home/src/projects/component-type-checker/packages/sdk/node_modules/@component-type-checker/components": vfstest.Symlink("/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.1/node_modules/@component-type-checker/components"), + "/home/src/projects/component-type-checker/packages/sdk/package.json": `{ + "name": "@component-type-checker/sdk1", + "version": "0.0.2", + "main": "./src/index.ts", + "dependencies": { + "@component-type-checker/components": "0.0.1", + "@component-type-checker/button": "0.0.1" + } +}`, + "/home/src/projects/component-type-checker/packages/sdk/src/index.ts": `export { Button, createButton } from "@component-type-checker/components"; +export const VERSION = "0.0.2";`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_test.go new file mode 100644 index 00000000000..b0e2c9051f0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noCheck_dts_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "dts errors", + CommandLineArgs: []string{"--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_with_incremental_test.go new file mode 100644 index 00000000000..684a71035da --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_with_incremental_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noCheck_dts_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "dts errors with incremental", + CommandLineArgs: []string{"--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_test.go new file mode 100644 index 00000000000..e81ab2e14b9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noCheck_semantic_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "semantic errors", + CommandLineArgs: []string{"--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a: number = \"hello\";", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_with_incremental_test.go new file mode 100644 index 00000000000..6025ebea795 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_with_incremental_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noCheck_semantic_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "semantic errors with incremental", + CommandLineArgs: []string{"--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a: number = \"hello\";", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_test.go new file mode 100644 index 00000000000..fc71ee6e267 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noCheck_syntax_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "syntax errors", + CommandLineArgs: []string{"--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = \"hello", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_with_incremental_test.go new file mode 100644 index 00000000000..e35b1357d8b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_with_incremental_test.go @@ -0,0 +1,122 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noCheck_syntax_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noCheck", + SubScenario: "syntax errors with incremental", + CommandLineArgs: []string{"--noCheck"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "export const a = \"hello", + "/home/src/workspaces/project/b.ts": "export const b = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "declaration": true, + "incremental": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Add file with error", + CommandLineArgs: []string{}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/c.ts", "export const c: number = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix `a` error with noCheck", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with checking", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_test.go new file mode 100644 index 00000000000..8a60cf00ce0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_dts_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "dts errors", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_test.go new file mode 100644 index 00000000000..2fb1bd8288d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_dts_errors_with_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "dts errors with declaration", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go new file mode 100644 index 00000000000..90db63c2cb3 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "dts errors with declaration with incremental", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_incremental_test.go new file mode 100644 index 00000000000..e67a4b77450 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_incremental_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_dts_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "dts errors with incremental", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +export const a = class { private p = 10; };`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +export const a = class { p = 10; };`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go new file mode 100644 index 00000000000..f98406ee666 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go @@ -0,0 +1,36 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "file deleted before fixing error with noEmitOnError", + CommandLineArgs: []string{"-i"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/file1.ts": "export const x: 30 = \"hello\";", + "/home/src/workspaces/project/file2.ts": "export class D { }", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "outDir": "outDir", + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "delete file without error", + Edit: func(sys *tsctests.TestSys) { + sys.Remove("/home/src/workspaces/project/file2.ts") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_test.go new file mode 100644 index 00000000000..14413e63305 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_semantic_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "semantic errors", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a: string = 10;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_test.go new file mode 100644 index 00000000000..a3b73ad4443 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_semantic_errors_with_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "semantic errors with declaration", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a: string = 10;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go new file mode 100644 index 00000000000..92cb4adf378 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "semantic errors with declaration with incremental", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a: string = 10;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_incremental_test.go new file mode 100644 index 00000000000..8c288ed9387 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_incremental_test.go @@ -0,0 +1,53 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_semantic_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "semantic errors with incremental", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a: string = 10;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a: string = "hello";`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_test.go new file mode 100644 index 00000000000..938a82e722d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_test.go @@ -0,0 +1,57 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_syntax_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "syntax errors", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_test.go new file mode 100644 index 00000000000..a40d9717871 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_test.go @@ -0,0 +1,57 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_syntax_errors_with_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "syntax errors with declaration", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": false, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go new file mode 100644 index 00000000000..33ce843f828 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go @@ -0,0 +1,57 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "syntax errors with declaration with incremental", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_incremental_test.go new file mode 100644 index 00000000000..18ee106b8d1 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_incremental_test.go @@ -0,0 +1,57 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_syntax_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "syntax errors with incremental", + CommandLineArgs: []string{}, + Cwd: "/user/username/projects/noEmitOnError", + Files: tsctests.FileMap{ + "/user/username/projects/noEmitOnError/shared/types/db.ts": `export interface A { + name: string; +}`, + "/user/username/projects/noEmitOnError/src/main.ts": `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +;`, + "/user/username/projects/noEmitOnError/src/other.ts": `console.log("hi"); +export { }`, + "/user/username/projects/noEmitOnError/tsconfig.json": `{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": true, + "noEmitOnError": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/user/username/projects/noEmitOnError/src/main.ts", `import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +};`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_when_declarationMap_changes_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_when_declarationMap_changes_test.go new file mode 100644 index 00000000000..2fbc9e40034 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_when_declarationMap_changes_test.go @@ -0,0 +1,45 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmitOnError_when_declarationMap_changes(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmitOnError", + SubScenario: "when declarationMap changes", + Files: tsctests.FileMap{ + "/home/src/workspaces/project/a.ts": "const x = 10;", + "/home/src/workspaces/project/b.ts": "const y = 10;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "noEmitOnError": true, + "declaration": true, + "composite": true, + }, +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "error and enable declarationMap", + CommandLineArgs: []string{"--declarationMap"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const x: 20 = 10;") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "fix error declarationMap", + CommandLineArgs: []string{"--declarationMap"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/a.ts", "const x = 10;") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_composite_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_composite_test.go new file mode 100644 index 00000000000..38b97ec0a75 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_composite_test.go @@ -0,0 +1,147 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_changes_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes composite", + CommandLineArgs: []string{}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "composite": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error but still noEmit", + CommandLineArgs: []string{"--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + CommandLineArgs: []string{"--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_declaration_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_declaration_test.go new file mode 100644 index 00000000000..1dc60a05f65 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_declaration_test.go @@ -0,0 +1,147 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_changes_incremental_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes incremental declaration", + CommandLineArgs: []string{}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "incremental": true, "declaration": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error but still noEmit", + CommandLineArgs: []string{"--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + CommandLineArgs: []string{"--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_test.go new file mode 100644 index 00000000000..7979f243e79 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_test.go @@ -0,0 +1,147 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_changes_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes incremental", + CommandLineArgs: []string{}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "incremental": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error but still noEmit", + CommandLineArgs: []string{"--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error and emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + CommandLineArgs: []string{"--noEmit"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with noEmit", + CommandLineArgs: []string{"--noEmit"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_composite_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_composite_test.go new file mode 100644 index 00000000000..714b8c13a20 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_composite_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_changes_with_initial_noEmit_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes with initial noEmit composite", + CommandLineArgs: []string{"--noEmit"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "composite": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with emit", + CommandLineArgs: []string{}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go new file mode 100644 index 00000000000..f4e6c35aa9a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes with initial noEmit incremental declaration", + CommandLineArgs: []string{"--noEmit"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "incremental": true, "declaration": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with emit", + CommandLineArgs: []string{}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_test.go new file mode 100644 index 00000000000..a4017d8b8e0 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_test.go @@ -0,0 +1,68 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_changes_with_initial_noEmit_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "changes with initial noEmit incremental", + CommandLineArgs: []string{"--noEmit"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/class.ts": `export class classC { + prop = 1; +}`, + "/home/src/workspaces/project/src/directUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/indirectClass.ts": `import { classC } from './class'; +export class indirectClass { + classC = new classC(); +}`, + "/home/src/workspaces/project/src/indirectUse.ts": `import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop;`, + "/home/src/workspaces/project/src/noChangeFile.ts": `export function writeLog(s: string) { +}`, + "/home/src/workspaces/project/src/noChangeFileWithEmitSpecificError.ts": `function someFunc(arguments: boolean, ...rest: any[]) { +}`, + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { "incremental": true } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error with emit", + CommandLineArgs: []string{}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop1 = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error and no emit", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/workspaces/project/src/class.ts", `export class classC { + prop = 1; +}`) + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "No Change run with emit", + CommandLineArgs: []string{}, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_test.go new file mode 100644 index 00000000000..e6c94662669 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_dts_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go new file mode 100644 index 00000000000..0a11c1d60eb --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go @@ -0,0 +1,79 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with declaration enable changes with multiple files", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/c.ts": "export const c = class { private p = 10; };", + "/home/src/projects/project/d.ts": "export const d = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit - Should report errors", + CommandLineArgs: []string{"--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit - Should report errors", + CommandLineArgs: []string{"--noEmit", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Dts Emit with error", + CommandLineArgs: []string{"--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix the error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = class { public p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration enabled noEmit", + CommandLineArgs: []string{"--noEmit", "--declaration"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "With declaration and declarationMap noEmit", + CommandLineArgs: []string{"--noEmit", "--declaration", "--declarationMap"}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix the another ", + CommandLineArgs: []string{"--noEmit", "--declaration", "--declarationMap"}, + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/c.ts", "export const c = class { public p = 10; };") + }, + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..d20a87cb87a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_as_modules_test.go @@ -0,0 +1,70 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_dts_errors_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with incremental as modules", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_test.go new file mode 100644 index 00000000000..6146dfe6652 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_dts_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors with incremental", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_test.go new file mode 100644 index 00000000000..ec36a2172a7 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_dts_errors_without_dts_enabled(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..f1845d6ff2d --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go @@ -0,0 +1,70 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled with incremental as modules", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = class { private p = 10; };", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go new file mode 100644 index 00000000000..aca10d29a3e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "dts errors without dts enabled with incremental", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = class { private p = 10; };", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = class { private p = 10; };") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_test.go new file mode 100644 index 00000000000..bc62bd5619c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_semantic_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a: number = \"hello\"", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..29439023236 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go @@ -0,0 +1,70 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_semantic_errors_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors with incremental as modules", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a: number = \"hello\"", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_test.go new file mode 100644 index 00000000000..40c7aad94e4 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_semantic_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "semantic errors with incremental", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a: number = \"hello\"", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a: number = \"hello\"") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_test.go new file mode 100644 index 00000000000..53c5bfe2dcb --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_syntax_errors(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = \"hello", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": false, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go new file mode 100644 index 00000000000..704052cc426 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go @@ -0,0 +1,70 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_syntax_errors_with_incremental_as_modules(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors with incremental as modules", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "export const a = \"hello", + "/home/src/projects/project/b.ts": "export const b = 10;", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "export const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_test.go new file mode 100644 index 00000000000..2556dcfa12e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_test.go @@ -0,0 +1,69 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_syntax_errors_with_incremental(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "syntax errors with incremental", + CommandLineArgs: []string{"--noEmit"}, + Cwd: "/home/src/projects/project", + Files: tsctests.FileMap{ + "/home/src/projects/project/a.ts": "const a = \"hello", + "/home/src/projects/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "declaration": false + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Fix error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello\";") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit after fixing error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Introduce error", + Edit: func(sys *tsctests.TestSys) { + sys.WriteFile("/home/src/projects/project/a.ts", "const a = \"hello") + }, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "Emit when error", + CommandLineArgs: []string{}, + }) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_when_project_has_strict_true_test.go b/internal/execute/tsctests/tests/Test_tsc_noEmit_when_project_has_strict_true_test.go new file mode 100644 index 00000000000..e2a7d26d8d6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_noEmit_when_project_has_strict_true_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_noEmit_when_project_has_strict_true(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "noEmit", + SubScenario: "when project has strict true", + CommandLineArgs: []string{"--noEmit"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/class1.ts": "export class class1 {}", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "incremental": true, + "strict": true + } +}`, + }, + } + test.Start(t) + + test.Edit(&tsctests.TestEdit{ + Caption: "no change", + }) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go new file mode 100644 index 00000000000..87f069c6011 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go @@ -0,0 +1,61 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "default import interop uses referenced project settings", + CommandLineArgs: []string{"--p", "app", "--pretty", "false"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/app/src/index.ts": `import local from "./local"; // Error +import esm from "esm-package"; // Error +import referencedSource from "../../lib/src/a"; // Error +import referencedDeclaration from "../../lib/dist/a"; // Error +import ambiguous from "ambiguous-package"; // Ok`, + "/home/src/workspaces/project/app/src/local.ts": "export const local = 0;", + "/home/src/workspaces/project/app/tsconfig.json": `{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": "src", + "outDir": "dist", + }, + "include": ["src"], + "references": [ + { "path": "../lib" }, + ], +}`, + "/home/src/workspaces/project/lib/dist/a.d.ts": "export declare const a = 0;", + "/home/src/workspaces/project/lib/src/a.ts": "export const a = 0;", + "/home/src/workspaces/project/lib/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "src", + "outDir": "dist", + "module": "esnext", + "moduleResolution": "bundler", + }, + "include": ["src"], +}`, + "/home/src/workspaces/project/node_modules/ambiguous-package/index.d.ts": "export declare const ambiguous: number;", + "/home/src/workspaces/project/node_modules/ambiguous-package/package.json": `{ + "name": "ambiguous-package" +}`, + "/home/src/workspaces/project/node_modules/esm-package/index.d.ts": "export declare const esm: number;", + "/home/src/workspaces/project/node_modules/esm-package/package.json": `{ + "name": "esm-package", + "type": "module" +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_setup_was_created_correctly_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_setup_was_created_correctly_test.go new file mode 100644 index 00000000000..e617b0236b1 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_setup_was_created_correctly_test.go @@ -0,0 +1,38 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_default_setup_was_created_correctly(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "default setup was created correctly", + CommandLineArgs: []string{"--p", "primary/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/primary/a.ts": "export { };", + "/home/src/workspaces/project/primary/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + } +}`, + "/home/src/workspaces/project/secondary/b.ts": "import * as mod_1 from \"../primary/a\";", + "/home/src/workspaces/project/secondary/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "references": [{ + "path": "../primary" + }] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go new file mode 100644 index 00000000000..65be5c99a87 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "does not error when the referenced project doesnt have composite if its a container project", + CommandLineArgs: []string{"--p", "reference/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/primary/a.ts": "export { };", + "/home/src/workspaces/project/primary/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "outDir": "bin", + } +}`, + "/home/src/workspaces/project/reference/b.ts": "import * as mod_1 from \"../primary/a\";", + "/home/src/workspaces/project/reference/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "files": [ ], + "references": [{ + "path": "../primary" + }] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go new file mode 100644 index 00000000000..b18efa98b1f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go @@ -0,0 +1,29 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "doesnt infer the rootDir from source paths", + CommandLineArgs: []string{"--p", "alpha/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/alpha/src/a.ts": "export const m: number = 3;", + "/home/src/workspaces/project/alpha/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "references": [] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go new file mode 100644 index 00000000000..55b3f630d61 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go @@ -0,0 +1,30 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "errors when a file is outside the rootdir", + CommandLineArgs: []string{"--p", "alpha/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/alpha/src/a.ts": "import * as b from '../../beta/b'", + "/home/src/workspaces/project/alpha/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "references": [] +}`, + "/home/src/workspaces/project/beta/b.ts": "export { }", + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_declaration_false_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_declaration_false_test.go new file mode 100644 index 00000000000..e1a37e5d0ec --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_declaration_false_test.go @@ -0,0 +1,29 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_errors_when_declaration_false(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "errors when declaration = false", + CommandLineArgs: []string{"--p", "primary/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/primary/a.ts": "export { };", + "/home/src/workspaces/project/primary/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + "declaration": false + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go new file mode 100644 index 00000000000..8c6547ae57a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go @@ -0,0 +1,30 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "errors when the file list is not exhaustive", + CommandLineArgs: []string{"--p", "primary/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/primary/a.ts": "import * as b from './b'", + "/home/src/workspaces/project/primary/b.ts": "export {}", + "/home/src/workspaces/project/primary/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "files": [ "a.ts" ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go new file mode 100644 index 00000000000..525df99a598 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go @@ -0,0 +1,31 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "errors when the referenced project doesnt exist", + CommandLineArgs: []string{"--p", "primary/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/primary/a.ts": "export { };", + "/home/src/workspaces/project/primary/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "references": [{ + "path": "../foo" + }] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go new file mode 100644 index 00000000000..9768d994b12 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "errors when the referenced project doesnt have composite", + CommandLineArgs: []string{"--p", "reference/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/primary/a.ts": "export { };", + "/home/src/workspaces/project/primary/tsconfig.json": `{ + "compilerOptions": { + "composite": false, + "outDir": "bin", + } +}`, + "/home/src/workspaces/project/reference/b.ts": "import * as mod_1 from \"../primary/a\";", + "/home/src/workspaces/project/reference/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "files": [ "b.ts" ], + "references": [ { "path": "../primary" } ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go new file mode 100644 index 00000000000..6240cfb10f9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go @@ -0,0 +1,54 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "importing const enum from referenced project with preserveConstEnums and verbatimModuleSyntax", + CommandLineArgs: []string{"--p", "project", "--pretty", "false"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/no-preserve/index.d.ts": "export declare const enum F { A = 1 }", + "/home/src/workspaces/solution/no-preserve/index.ts": "export const enum E { A = 1 }", + "/home/src/workspaces/solution/no-preserve/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "preserveConstEnums": false, + }, +}`, + "/home/src/workspaces/solution/preserve/index.d.ts": "export declare const enum E { A = 1 }", + "/home/src/workspaces/solution/preserve/index.ts": "export const enum E { A = 1 }", + "/home/src/workspaces/solution/preserve/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "preserveConstEnums": true, + }, +}`, + "/home/src/workspaces/solution/project/index.ts": `import { E } from "../preserve"; +import { F } from "../no-preserve"; +E.A; +F.A;`, + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "module": "preserve", + "verbatimModuleSyntax": true, + }, + "references": [ + { "path": "../preserve" }, + { "path": "../no-preserve" }, + ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go new file mode 100644 index 00000000000..252f848ef4b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "issues a nice error when the input file is missing", + CommandLineArgs: []string{"--p", "beta/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/alpha/a.ts": "export const m: number = 3;", + "/home/src/workspaces/project/alpha/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "references": [] +}`, + "/home/src/workspaces/project/beta/b.ts": "import { m } from '../alpha/a'", + "/home/src/workspaces/project/beta/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "references": [ { "path": "../alpha" } ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go new file mode 100644 index 00000000000..55af768ac2c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go @@ -0,0 +1,39 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "issues a nice error when the input file is missing when module reference is not relative", + CommandLineArgs: []string{"--p", "beta/tsconfig.json"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/alpha/a.ts": "export const m: number = 3;", + "/home/src/workspaces/project/alpha/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + } +}`, + "/home/src/workspaces/project/beta/b.ts": "import { m } from '@alpha/a'", + "/home/src/workspaces/project/beta/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + "paths": { + "@alpha/*": ["../alpha/*"], + }, + }, + "references": [ { "path": "../alpha" } ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_redirects_to_the_output_dts_file_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_redirects_to_the_output_dts_file_test.go new file mode 100644 index 00000000000..601638fa547 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_redirects_to_the_output_dts_file_test.go @@ -0,0 +1,37 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_redirects_to_the_output_dts_file(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "redirects to the output dts file", + CommandLineArgs: []string{"--p", "beta/tsconfig.json", "--explainFiles"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/alpha/a.ts": "export const m: number = 3;", + "/home/src/workspaces/project/alpha/bin/a.d.ts": "export { };", + "/home/src/workspaces/project/alpha/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + } +}`, + "/home/src/workspaces/project/beta/b.ts": "import { m } from '../alpha/a'", + "/home/src/workspaces/project/beta/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "outDir": "bin", + }, + "references": [ { "path": "../alpha" } ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go new file mode 100644 index 00000000000..f590b997397 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go @@ -0,0 +1,47 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "referenced project with esnext module disallows synthetic default imports", + CommandLineArgs: []string{"--p", "app", "--pretty", "false"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/app/index.ts": `import TestSrc from '../lib/src/utils'; // Error +import TestDecl from '../lib/dist/utils'; // Error +console.log(TestSrc.test()); +console.log(TestDecl.test());`, + "/home/src/workspaces/project/app/tsconfig.json": `{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler" + }, + "references": [ + { "path": "../lib" } + ] +}`, + "/home/src/workspaces/project/lib/dist/utils.d.ts": "export declare const test: () => string;", + "/home/src/workspaces/project/lib/src/utils.ts": "export const test = () => 'test';", + "/home/src/workspaces/project/lib/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go new file mode 100644 index 00000000000..bd29d1d31b5 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go @@ -0,0 +1,40 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "referencing ambient const enum from referenced project with preserveConstEnums", + CommandLineArgs: []string{"--p", "project"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/index.ts": "import { E } from \"../utils\"; E.A;", + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "compilerOptions": { + "isolatedModules": true, + }, + "references": [ + { "path": "../utils" }, + ], +}`, + "/home/src/workspaces/solution/utils/index.d.ts": "export declare const enum E { A = 1 }", + "/home/src/workspaces/solution/utils/index.ts": "export const enum E { A = 1 }", + "/home/src/workspaces/solution/utils/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "declaration": true, + "preserveConstEnums": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go new file mode 100644 index 00000000000..e81cce81432 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go @@ -0,0 +1,58 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "rewriteRelativeImportExtensionsProjectReferences1", + CommandLineArgs: []string{"-p", "packages/main", "--pretty", "false"}, + Cwd: "/home/src/workspaces", + Files: tsctests.FileMap{ + "/home/src/workspaces/packages/common/dist/index.d.ts": "export {};", + "/home/src/workspaces/packages/common/package.json": `{ + "name": "common", + "version": "1.0.0", + "type": "module", + "exports": { + ".": { + "source": "./src/index.ts", + "default": "./dist/index.js" + } + } +}`, + "/home/src/workspaces/packages/common/src/index.ts": "export {};", + "/home/src/workspaces/packages/common/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "rootDir": "src", + "outDir": "dist", + "module": "nodenext" + } +}`, + "/home/src/workspaces/packages/main/package.json": `{ + "type": "module" +}`, + "/home/src/workspaces/packages/main/src/index.ts": "import {} from \"../../common/src/index.ts\";", + "/home/src/workspaces/packages/main/tsconfig.json": `{ + "compilerOptions": { + "module": "nodenext", + "rewriteRelativeImportExtensions": true, + "rootDir": "src", + "outDir": "dist" + }, + "references": [ + { "path": "../common" } + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go new file mode 100644 index 00000000000..931dce55a83 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go @@ -0,0 +1,45 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "rewriteRelativeImportExtensionsProjectReferences2", + CommandLineArgs: []string{"--p", "src/services", "--pretty", "false"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/dist/compiler/parser.d.ts": "export {};", + "/home/src/workspaces/solution/src/compiler/parser.ts": "export {};", + "/home/src/workspaces/solution/src/compiler/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": {} +}`, + "/home/src/workspaces/solution/src/services/services.ts": "import {} from \"../compiler/parser.ts\";", + "/home/src/workspaces/solution/src/services/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": {}, + "references": [ + { "path": "../compiler" } + ] +}`, + "/home/src/workspaces/solution/src/tsconfig-base.json": `{ + "compilerOptions": { + "module": "nodenext", + "composite": true, + "rootDir": ".", + "outDir": "../dist", + "rewriteRelativeImportExtensions": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go new file mode 100644 index 00000000000..f2bc13c312e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go @@ -0,0 +1,49 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "rewriteRelativeImportExtensionsProjectReferences3", + CommandLineArgs: []string{"--p", "src/services", "--pretty", "false"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/dist/compiler/parser.d.ts": "export {};", + "/home/src/workspaces/solution/src/compiler/parser.ts": "export {};", + "/home/src/workspaces/solution/src/compiler/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "../../dist/compiler" + } +}`, + "/home/src/workspaces/solution/src/services/services.ts": "import {} from \"../compiler/parser.ts\";", + "/home/src/workspaces/solution/src/services/tsconfig.json": `{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "../../dist/services" + }, + "references": [ + { "path": "../compiler" } + ] +}`, + "/home/src/workspaces/solution/src/tsconfig-base.json": `{ + "compilerOptions": { + "module": "nodenext", + "composite": true, + "rewriteRelativeImportExtensions": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_contains_invalid_project_reference_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_contains_invalid_project_reference_test.go new file mode 100644 index 00000000000..3822e2d560b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_contains_invalid_project_reference_test.go @@ -0,0 +1,28 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_when_project_contains_invalid_project_reference(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "when project contains invalid project reference", + CommandLineArgs: []string{"--p", "project"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/index.ts": "export const x = 10;", + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "references": [ + { "path": "../utils" }, + ], +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_reference_is_not_built_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_reference_is_not_built_test.go new file mode 100644 index 00000000000..69636fdf0f9 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_reference_is_not_built_test.go @@ -0,0 +1,34 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_when_project_reference_is_not_built(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "when project reference is not built", + CommandLineArgs: []string{"--p", "project"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/index.ts": "import { x } from \"../utils\";", + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "references": [ + { "path": "../utils" }, + ], +}`, + "/home/src/workspaces/solution/utils/index.ts": "export const x = 10;", + "/home/src/workspaces/solution/utils/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go new file mode 100644 index 00000000000..db3c243422c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go @@ -0,0 +1,35 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "when project references composite project with noEmit", + CommandLineArgs: []string{"--p", "project"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/index.ts": "import { x } from \"../utils\";", + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "references": [ + { "path": "../utils" }, + ], +}`, + "/home/src/workspaces/solution/utils/index.ts": "export const x = 10;", + "/home/src/workspaces/solution/utils/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "noEmit": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_test.go b/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_test.go new file mode 100644 index 00000000000..a3a0f2344b6 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_test.go @@ -0,0 +1,35 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_projectReferences_when_project_references_composite(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "projectReferences", + SubScenario: "when project references composite", + CommandLineArgs: []string{"--p", "project"}, + Cwd: "/home/src/workspaces/solution", + Files: tsctests.FileMap{ + "/home/src/workspaces/solution/project/index.ts": "import { x } from \"../utils\";", + "/home/src/workspaces/solution/project/tsconfig.json": `{ + "references": [ + { "path": "../utils" }, + ], +}`, + "/home/src/workspaces/solution/utils/index.d.ts": "export declare const x = 10;", + "/home/src/workspaces/solution/utils/index.ts": "export const x = 10;", + "/home/src/workspaces/solution/utils/tsconfig.json": `{ + "compilerOptions": { + "composite": true + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Default_initialized_TSConfig_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Default_initialized_TSConfig_test.go new file mode 100644 index 00000000000..4a5a6086f1f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Default_initialized_TSConfig_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Default_initialized_TSConfig(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Default initialized TSConfig", + CommandLineArgs: []string{"--showConfig"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_advanced_options_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_advanced_options_test.go new file mode 100644 index 00000000000..f944e679319 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_advanced_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_advanced_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with advanced options", + CommandLineArgs: []string{"--showConfig", "--declaration", "--declarationDir", "lib", "--skipLibCheck", "--noErrorTruncation"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go new file mode 100644 index 00000000000..908f6298c6f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with boolean value compiler options", + CommandLineArgs: []string{"--showConfig", "--noUnusedLocals"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go new file mode 100644 index 00000000000..778ac05096a --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go @@ -0,0 +1,41 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with compileOnSave and more", + CommandLineArgs: []string{"-p", "tsconfig.json", "--showConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const a = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "esModuleInterop": true, + "target": "es5", + "module": "commonjs", + "strict": true + }, + "compileOnSave": true, + "exclude": [ + "dist" + ], + "files": [], + "include": [ + "src/*" + ], + "references": [ + { "path": "./test" } + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go new file mode 100644 index 00000000000..c44afd91079 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with enum value compiler options", + CommandLineArgs: []string{"--showConfig", "--target", "es5", "--jsx", "react"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go new file mode 100644 index 00000000000..42f6eb706e2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with exclude and outDir", + CommandLineArgs: []string{"-p", "tsconfig.json", "--showConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/bin/tool.ts": "export const b = 2;", + "/home/src/workspaces/project/src/index.ts": "export const a = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true, + "outDir": "./build" + }, + "exclude": [ + "build" + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_test.go new file mode 100644 index 00000000000..3e03e7f4d7f --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_test.go @@ -0,0 +1,31 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_exclude(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with exclude", + CommandLineArgs: []string{"-p", "tsconfig.json", "--showConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const a = 1;", + "/home/src/workspaces/project/test/test1.ts": "import { a } from \"../src\";", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true + }, + "exclude": [ + "test" + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_and_include_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_and_include_test.go new file mode 100644 index 00000000000..d3b2861aa3b --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_and_include_test.go @@ -0,0 +1,34 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_files_and_include(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with files and include", + CommandLineArgs: []string{"-p", "tsconfig.json", "--showConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/extra.ts": "export const c = 3;", + "/home/src/workspaces/project/src/main.ts": "export const a = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true + }, + "files": [ + "extra.ts" + ], + "include": [ + "src/**/*" + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_options_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_options_test.go new file mode 100644 index 00000000000..5df836f8a4c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_files_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with files options", + CommandLineArgs: []string{"--showConfig", "file0.ts", "file1.ts", "file2.ts"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go new file mode 100644 index 00000000000..14d8f64870c --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with include filtering files", + CommandLineArgs: []string{"-p", "tsconfig.json", "--showConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/extra.ts": "export const c = 3;", + "/home/src/workspaces/project/src/main.ts": "export const a = 1;", + "/home/src/workspaces/project/src/util.ts": "export const b = 2;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "strict": true + }, + "include": [ + "src/**/*" + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go new file mode 100644 index 00000000000..715e905b2cc --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with incorrect compiler option", + CommandLineArgs: []string{"--showConfig", "--someNonExistOption"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go new file mode 100644 index 00000000000..de90e7cf4b2 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with incorrect compiler option value", + CommandLineArgs: []string{"--showConfig", "--lib", "nonExistLib,es5,es2015.promise"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go new file mode 100644 index 00000000000..18b67cb28bc --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with list compiler options", + CommandLineArgs: []string{"--showConfig", "--types", "jquery,mocha"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go new file mode 100644 index 00000000000..f4b15878002 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go @@ -0,0 +1,19 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with list compiler options with enum value", + CommandLineArgs: []string{"--showConfig", "--lib", "es5,es2015.core"}, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go new file mode 100644 index 00000000000..df8718bfe85 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go @@ -0,0 +1,49 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_paths_and_more(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with paths and more", + CommandLineArgs: []string{"-p", "tsconfig.json", "--showConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const a = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "allowJs": true, + "outDir": "./lib", + "esModuleInterop": true, + "module": "commonjs", + "moduleResolution": "node", + "target": "ES2017", + "sourceMap": true, + "baseUrl": ".", + "paths": { + "@root/*": ["./*"], + "@configs/*": ["src/configs/*"], + "@common/*": ["src/common/*"], + "*": [ + "node_modules/*", + "src/types/*" + ] + }, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "resolveJsonModule": true + }, + "include": [ + "./src/**/*" + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_references_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_references_test.go new file mode 100644 index 00000000000..d9f8d2dfbdf --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_references_test.go @@ -0,0 +1,32 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_references(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with references", + CommandLineArgs: []string{"-p", "tsconfig.json", "--showConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const a = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "strict": true + }, + "references": [ + { "path": "./packages/a" }, + { "path": "./packages/b" } + ] +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go new file mode 100644 index 00000000000..2f0b8d59298 --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go @@ -0,0 +1,27 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "showConfig", + SubScenario: "Show TSConfig with transitively implied options", + CommandLineArgs: []string{"-p", "tsconfig.json", "--showConfig"}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/src/index.ts": "export const a = 1;", + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "module": "nodenext" + } +}`, + }, + } + test.Start(t) + test.End() +} diff --git a/internal/execute/tsctests/tests/Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go b/internal/execute/tsctests/tests/Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go new file mode 100644 index 00000000000..095fb6e1c3e --- /dev/null +++ b/internal/execute/tsctests/tests/Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go @@ -0,0 +1,33 @@ +// Code generated by tsctests; DO NOT EDIT. + +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/execute/tsctests" +) + +func Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition(t *testing.T) { + test := &tsctests.TestSpec{ + Scenario: "typeAcquisition", + SubScenario: "parse tsconfig with typeAcquisition", + CommandLineArgs: []string{}, + Files: tsctests.FileMap{ + "/home/src/workspaces/project/tsconfig.json": `{ + "compilerOptions": { + "composite": true, + "noEmit": true, + }, + "typeAcquisition": { + "enable": true, + "include": ["0.d.ts", "1.d.ts"], + "exclude": ["0.js", "1.js"], + "disableFilenameBasedTypeAcquisition": true, + }, +}`, + }, + } + test.Start(t) + test.End() +} From 7c517d7dcdef27df9cf014ea4d3e91ac93a5d5fa Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 20 May 2026 09:45:14 -0700 Subject: [PATCH 2/3] Rename files --- internal/execute/tsctests/extract.go | 16 +++++++++++----- ...reports_syntax_errors_in_config_file_test.go} | 2 +- ...atch_demo_updates_with_bad_reference_test.go} | 2 +- ...demo_updates_with_circular_reference_test.go} | 2 +- ...uildWatch_extends_configDir_template_test.go} | 2 +- ...dWatch_libraryResolution_with_config_test.go} | 2 +- ...tion_with_config_with_libReplacement_test.go} | 2 +- ..._changes_to_package_json_main_fields_test.go} | 2 +- ...different_module_resolution_settings_test.go} | 2 +- ...orrectly_with_cts_and_mts_extensions_test.go} | 2 +- ...ildWatch_noEmitOnError_noEmitOnError_test.go} | 2 +- ...Error_noEmitOnError_with_declaration_test.go} | 2 +- ...or_with_declaration_with_incremental_test.go} | 2 +- ...Error_noEmitOnError_with_incremental_test.go} | 2 +- ...n_watching_when_no_files_are_emitted_test.go} | 2 +- ...o_files_are_emitted_with_incremental_test.go} | 2 +- ...go => tsbuildWatch_noEmit_dts_errors_test.go} | 2 +- ...s_errors_with_incremental_as_modules_test.go} | 2 +- ...h_noEmit_dts_errors_with_incremental_test.go} | 2 +- ...oEmit_dts_errors_without_dts_enabled_test.go} | 2 +- ..._enabled_with_incremental_as_modules_test.go} | 2 +- ...without_dts_enabled_with_incremental_test.go} | 2 +- ... tsbuildWatch_noEmit_semantic_errors_test.go} | 2 +- ...c_errors_with_incremental_as_modules_test.go} | 2 +- ...mit_semantic_errors_with_incremental_test.go} | 2 +- ...=> tsbuildWatch_noEmit_syntax_errors_test.go} | 2 +- ...x_errors_with_incremental_as_modules_test.go} | 2 +- ...oEmit_syntax_errors_with_incremental_test.go} | 2 +- ...rror_when_file_with_no_error_changes_test.go} | 2 +- ..._errors_only_changed_file_is_emitted_test.go} | 2 +- ...rors_when_file_with_no_error_changes_test.go} | 2 +- ...ng_error_files_all_files_are_emitted_test.go} | 2 +- ...programUpdates_tsbuildinfo_has_error_test.go} | 2 +- ...own_stream_project_and_then_fixes_it_test.go} | 2 +- ...ject_with_extended_config_is_removed_test.go} | 2 +- ..._noUnusedParameters_changes_to_false_test.go} | 2 +- ...tes_works_with_extended_source_files_test.go} | 2 +- ..._there_are_23_projects_in_a_solution_test.go} | 2 +- ...ojects_in_a_solution_with_builders_3_test.go} | 2 +- ...n_there_are_3_projects_in_a_solution_test.go} | 2 +- ...ojects_in_a_solution_with_builders_1_test.go} | 2 +- ...n_there_are_5_projects_in_a_solution_test.go} | 2 +- ...ojects_in_a_solution_with_builders_2_test.go} | 2 +- ...n_there_are_8_projects_in_a_solution_test.go} | 2 +- ...ojects_in_a_solution_with_builders_3_test.go} | 2 +- ...ch_reexport_Reports_errors_correctly_test.go} | 2 +- ...ferenced_project_and_shared_is_first_test.go} | 2 +- ...root_file_is_from_referenced_project_test.go} | 2 +- ..._is_added_and_its_subsequent_updates_test.go} | 2 +- ...ent_updates_with_circular_references_test.go} | 2 +- ...ges_and_reports_found_errors_message_test.go} | 2 +- ...ors_message_with_circular_references_test.go} | 2 +- ..._incremental_updates_in_verbose_mode_test.go} | 2 +- ..._start_build_of_referencing_projects_test.go} | 2 +- ...ng_projects_with_circular_references_test.go} | 2 +- ...when_preserveWatchOutput_is_not_used_test.go} | 2 +- ...atchOutput_is_passed_on_command_line_test.go} | 2 +- ...ldOnErrors_is_passed_on_command_line_test.go} | 2 +- ...ecompilation_because_of_program_emit_test.go} | 2 +- ...f_program_emit_with_outDir_specified_test.go} | 2 +- ...s_have_errors_with_stopBuildOnErrors_test.go} | 2 +- ...rs_when_test_does_not_reference_core_test.go} | 2 +- ...es_config_files_that_are_not_present_test.go} | 2 +- ...n_file_name_and_output_name_clashing_test.go} | 2 +- ...o => tsbuild_clean_tsx_with_dts_emit_test.go} | 2 +- ...go => tsbuild_commandLine_bad_locale_test.go} | 2 +- ...sbuild_commandLine_different_options_test.go} | 2 +- ...e_different_options_with_incremental_test.go} | 2 +- ...DeclarationOnly_false_on_commandline_test.go} | 2 +- ...ine_with_declaration_and_incremental_test.go} | 2 +- ...alse_on_commandline_with_declaration_test.go} | 2 +- ...e_emitDeclarationOnly_on_commandline_test.go} | 2 +- ...ine_with_declaration_and_incremental_test.go} | 2 +- ...Only_on_commandline_with_declaration_test.go} | 2 +- ..._test.go => tsbuild_commandLine_help_test.go} | 2 +- ...est.go => tsbuild_commandLine_locale_test.go} | 2 +- ...ndLine_when_build_not_first_argument_test.go} | 2 +- ...configFileErrors_missing_config_file_test.go} | 2 +- ...reports_syntax_errors_in_config_file_test.go} | 2 +- ...en_tsconfig_extends_the_missing_file_test.go} | 2 +- ...onEmit_reports_dts_generation_errors_test.go} | 2 +- ...s_generation_errors_with_incremental_test.go} | 2 +- ..._triple_slash_but_uses_no_references_test.go} | 2 +- ...e_is_referenced_through_triple_slash_test.go} | 2 +- ...nferred_type_from_referenced_project_test.go} | 2 +- ...ot_in_rootDir_at_the_import_location_test.go} | 2 +- ...the_error_about_it_by_stopping_build_test.go} | 2 +- ..._in_circular_is_set_in_the_reference_test.go} | 2 +- ...setup_correctly_and_reports_no_error_test.go} | 2 +- ...itDeclarationOnly_and_declarationMap_test.go} | 2 +- ...ort_project_with_emitDeclarationOnly_test.go} | 2 +- ...rts_project_with_emitDeclarationOnly_test.go} | 2 +- ...> tsbuild_extends_configDir_template_test.go} | 2 +- ...ld_extends_resolves_the_symlink_path_test.go} | 2 +- ..._and_both_extend_config_with_include_test.go} | 2 +- ...projects_extends_config_with_include_test.go} | 2 +- ...elete_deleted_file_without_composite_test.go} | 2 +- ...uild_fileDelete_detects_deleted_file_test.go} | 2 +- ...ferences_another_project_in_monorepo_test.go} | 2 +- ...inferred_type_from_transitive_module_test.go} | 2 +- ...ansitive_module_with_isolatedModules_test.go} | 2 +- ...ge_in_signature_with_isolatedModules_test.go} | 2 +- ...ed_projects_and_emits_them_correctly_test.go} | 2 +- ..._json_files_and_emits_them_correctly_test.go} | 2 +- ...erged_and_contains_late_bound_member_test.go} | 2 +- ...sbuild_libraryResolution_with_config_test.go} | 2 +- ...tion_with_config_with_libReplacement_test.go} | 2 +- ...ers_between_projects_for_shared_file_test.go} | 2 +- ...tion_from_d_ts_of_referenced_project_test.go} | 2 +- ...le_from_referenced_project_correctly_test.go} | 2 +- ...ject_correctly_with_preserveSymlinks_test.go} | 2 +- ...d_resolution_should_not_report_error_test.go} | 2 +- ...esolution_options_referenced_project_test.go} | 2 +- ...lution_when_resolution_is_not_shared_test.go} | 2 +- ...rs_across_projects_resolve_correctly_test.go} | 2 +- ..._module_specifiers_resolve_correctly_test.go} | 2 +- ...est.go => tsbuild_noCheck_dts_errors_test.go} | 2 +- ..._noCheck_dts_errors_with_incremental_test.go} | 2 +- ...o => tsbuild_noCheck_semantic_errors_test.go} | 2 +- ...eck_semantic_errors_with_incremental_test.go} | 2 +- ....go => tsbuild_noCheck_syntax_errors_test.go} | 2 +- ...Check_syntax_errors_with_incremental_test.go} | 2 +- ... => tsbuild_noEmitOnError_dts_errors_test.go} | 2 +- ...tOnError_dts_errors_with_declaration_test.go} | 2 +- ...rs_with_declaration_with_incremental_test.go} | 2 +- ...tOnError_dts_errors_with_incremental_test.go} | 2 +- ...sbuild_noEmitOnError_semantic_errors_test.go} | 2 +- ...ror_semantic_errors_with_declaration_test.go} | 2 +- ...rs_with_declaration_with_incremental_test.go} | 2 +- ...ror_semantic_errors_with_incremental_test.go} | 2 +- ... tsbuild_noEmitOnError_syntax_errors_test.go} | 2 +- ...Error_syntax_errors_with_declaration_test.go} | 2 +- ...rs_with_declaration_with_incremental_test.go} | 2 +- ...Error_syntax_errors_with_incremental_test.go} | 2 +- ... => tsbuild_noEmit_changes_composite_test.go} | 2 +- ...Emit_changes_incremental_declaration_test.go} | 2 +- ...> tsbuild_noEmit_changes_incremental_test.go} | 2 +- ...hanges_with_initial_noEmit_composite_test.go} | 2 +- ...itial_noEmit_incremental_declaration_test.go} | 2 +- ...nges_with_initial_noEmit_incremental_test.go} | 2 +- ...test.go => tsbuild_noEmit_dts_errors_test.go} | 2 +- ...rors_with_declaration_enable_changes_test.go} | 2 +- ..._changes_with_incremental_as_modules_test.go} | 2 +- ...tion_enable_changes_with_incremental_test.go} | 2 +- ...n_enable_changes_with_multiple_files_test.go} | 2 +- ...s_errors_with_incremental_as_modules_test.go} | 2 +- ...d_noEmit_dts_errors_with_incremental_test.go} | 2 +- ...oEmit_dts_errors_without_dts_enabled_test.go} | 2 +- ..._enabled_with_incremental_as_modules_test.go} | 2 +- ...without_dts_enabled_with_incremental_test.go} | 2 +- ...go => tsbuild_noEmit_semantic_errors_test.go} | 2 +- ...c_errors_with_incremental_as_modules_test.go} | 2 +- ...mit_semantic_errors_with_incremental_test.go} | 2 +- ...t.go => tsbuild_noEmit_syntax_errors_test.go} | 2 +- ...x_errors_with_incremental_as_modules_test.go} | 2 +- ...oEmit_syntax_errors_with_incremental_test.go} | 2 +- ...ir_is_not_specified_and_is_composite_test.go} | 2 +- ...tPaths_when_rootDir_is_not_specified_test.go} | 2 +- ...s_belong_to_rootDir_and_is_composite_test.go} | 2 +- ..._but_not_all_files_belong_to_rootDir_test.go} | 2 +- ...utputPaths_when_rootDir_is_specified_test.go} | 2 +- ...oot_is_source_from_project_reference_test.go} | 2 +- ...rom_project_reference_with_composite_test.go} | 2 +- ...ile_belongs_to_multiple_sub_projects_test.go} | 2 +- ...WithRootDirInParent_builds_correctly_test.go} | 2 +- ..._file_because_no_rootDir_in_the_base_test.go} | 2 +- ...orts_error_for_same_tsbuildinfo_file_test.go} | 2 +- ...tsbuildinfo_file_without_incremental_test.go} | 2 +- ...fo_file_without_incremental_with_tsc_test.go} | 2 +- ...rts_no_error_when_tsbuildinfo_differ_test.go} | 2 +- ..._there_are_23_projects_in_a_solution_test.go} | 2 +- ...ojects_in_a_solution_with_builders_3_test.go} | 2 +- ...n_there_are_3_projects_in_a_solution_test.go} | 2 +- ...ojects_in_a_solution_with_builders_1_test.go} | 2 +- ...n_there_are_5_projects_in_a_solution_test.go} | 2 +- ...ojects_in_a_solution_with_builders_2_test.go} | 2 +- ...n_there_are_8_projects_in_a_solution_test.go} | 2 +- ...ojects_in_a_solution_with_builders_3_test.go} | 2 +- ...s_containing_json_file_non_composite_test.go} | 2 +- ...sonModule_files_containing_json_file_test.go} | 2 +- ...g_json_module_from_project_reference_test.go} | 2 +- ...dule_include_and_files_non_composite_test.go} | 2 +- ..._resolveJsonModule_include_and_files_test.go} | 2 +- ...e_name_matches_ts_file_non_composite_test.go} | 2 +- ...nclude_and_file_name_matches_ts_file_test.go} | 2 +- ...ong_with_other_include_non_composite_test.go} | 2 +- ...ude_of_json_along_with_other_include_test.go} | 2 +- ...sonModule_include_only_non_composite_test.go} | 2 +- ...build_resolveJsonModule_include_only_test.go} | 2 +- ...th_json_not_in_rootDir_non_composite_test.go} | 2 +- ...nclude_only_with_json_not_in_rootDir_test.go} | 2 +- ...utside_configDirectory_non_composite_test.go} | 2 +- ..._rootDir_but_outside_configDirectory_test.go} | 2 +- ...de_only_without_outDir_non_composite_test.go} | 2 +- ...onModule_include_only_without_outDir_test.go} | 2 +- ...veJsonModule_sourcemap_non_composite_test.go} | 2 +- ... tsbuild_resolveJsonModule_sourcemap_test.go} | 2 +- ...nModule_without_outDir_non_composite_test.go} | 2 +- ...ild_resolveJsonModule_without_outDir_test.go} | 2 +- ...cutive_and_non_consecutive_are_mixed_test.go} | 2 +- ...roots_when_files_are_not_consecutive_test.go} | 2 +- ..._multiple_root_files_are_consecutive_test.go} | 2 +- ...ferenced_project_and_shared_is_first_test.go} | 2 +- ...root_file_is_from_referenced_project_test.go} | 2 +- ..._when_two_root_files_are_consecutive_test.go} | 2 +- ...lways_builds_under_with_force_option_test.go} | 2 +- ...n_not_build_order_doesnt_throw_error_test.go} | 2 +- ...tly_when_declarationDir_is_specified_test.go} | 2 +- ...s_correctly_when_outDir_is_specified_test.go} | 2 +- ...posite_or_doesnt_have_any_references_test.go} | 2 +- ...ven_if_upstream_projects_have_errors_test.go} | 2 +- ..._can_detect_when_and_what_to_rebuild_test.go} | 2 +- ...n_not_build_order_doesnt_throw_error_test.go} | 2 +- ...s_not_write_any_files_in_a_dry_build_test.go} | 2 +- ...st.go => tsbuild_sample_explainFiles_test.go} | 2 +- ...would_skip_builds_during_a_dry_build_test.go} | 2 +- ...o => tsbuild_sample_listEmittedFiles_test.go} | 2 +- ..._test.go => tsbuild_sample_listFiles_test.go} | 2 +- ..._tsbuildinfo_doesnt_match_ts_version_test.go} | 2 +- ...ds_from_start_if_force_option_is_set_test.go} | 2 +- ...ds_when_extended_config_file_changes_test.go} | 2 +- ...ld_sample_removes_all_files_it_built_test.go} | 2 +- ...ports_error_if_input_file_is_missing_test.go} | 2 +- ..._if_input_file_is_missing_with_force_test.go} | 2 +- ...ple_test.go => tsbuild_sample_sample_test.go} | 2 +- ...s_have_errors_with_stopBuildOnErrors_test.go} | 2 +- ...rs_when_test_does_not_reference_core_test.go} | 2 +- ...tsbuild_sample_tsbuildinfo_has_error_test.go} | 2 +- ...d_sample_when_declarationMap_changes_test.go} | 2 +- ...mple_when_declaration_option_changes_test.go} | 2 +- ..._when_esModuleInterop_option_changes_test.go} | 2 +- ...change_but_its_modified_time_changes_test.go} | 2 +- ...when_logic_specifies_tsBuildInfoFile_test.go} | 2 +- ...ld_sample_when_module_option_changes_test.go} | 2 +- ...ld_sample_when_target_option_changes_test.go} | 2 +- ...is_empty_and_references_are_provided_test.go} | 2 +- ...empty_and_no_references_are_provided_test.go} | 2 +- ..._initial_build_doesnt_build_anything_test.go} | 2 +- ...en_solution_is_referenced_indirectly_test.go} | 2 +- ...ransitiveReferences_builds_correctly_test.go} | 2 +- ...resolution_with_external_module_name_test.go} | 2 +- ...cts_at_types_package_installed_later_test.go} | 2 +- ...tch_detects_change_in_symlinked_file_test.go} | 2 +- ...le_new_subdirectories_simultaneously_test.go} | 2 +- ...ile_added_in_new_nested_subdirectory_test.go} | 2 +- ...previously_non_existent_include_path_test.go} | 2 +- ...ed_and_new_file_added_simultaneously_test.go} | 2 +- ...etects_file_renamed_and_renamed_back_test.go} | 2 +- ...tch_detects_import_path_restructured_test.go} | 2 +- ...h_detects_imported_directory_removed_test.go} | 2 +- ...imported_file_added_in_new_directory_test.go} | 2 +- ...odule_going_missing_then_coming_back_test.go} | 2 +- ...d_subdirectory_removed_and_recreated_test.go} | 2 +- ...w_file_in_existing_include_directory_test.go} | 2 +- ...cts_new_file_resolving_failed_import_test.go} | 2 +- ...h_detects_node_modules_package_added_test.go} | 2 +- ...detects_node_modules_package_removed_test.go} | 2 +- ...ects_package_json_types_field_edited_test.go} | 2 +- ...tch_detects_scoped_package_installed_test.go} | 2 +- ...watch_handles_file_rapidly_recreated_test.go} | 2 +- ...Watch_watch_handles_tsconfig_deleted_test.go} | 2 +- ..._tsconfig_with_extends_base_modified_test.go} | 2 +- ...watch_rebuilds_when_file_is_modified_test.go} | 2 +- ...rebuilds_when_source_file_is_deleted_test.go} | 2 +- ...n_tsconfig_include_pattern_adds_file_test.go} | 2 +- ...sconfig_is_modified_to_change_strict_test.go} | 2 +- ...fig_is_touched_but_content_unchanged_test.go} | 2 +- ...tch_skips_build_when_no_files_change_test.go} | 2 +- ...mandLineWatch_watch_with_no_tsconfig_test.go} | 2 +- ..._watch_with_tsconfig_and_incremental_test.go} | 2 +- ...th_tsconfig_files_list_entry_deleted_test.go} | 2 +- ...Line_Initialized_TSConfig_with_watch_test.go} | 2 +- ...mandLine_Parse_watch_interval_option_test.go} | 2 +- ...nterval_option_without_tsconfig_json_test.go} | 2 +- ...est.go => tscWatch_noEmit_dts_errors_test.go} | 2 +- ...oEmit_dts_errors_without_dts_enabled_test.go} | 2 +- ...o => tscWatch_noEmit_semantic_errors_test.go} | 2 +- ....go => tscWatch_noEmit_syntax_errors_test.go} | 2 +- ...ile_and_refers_to_config_with_noEmit_test.go} | 2 +- ...lized_TSConfig_with_advanced_options_test.go} | 2 +- ..._with_boolean_value_compiler_options_test.go} | 2 +- ...fig_with_enum_value_compiler_options_test.go} | 2 +- ...tialized_TSConfig_with_files_options_test.go} | 2 +- ...dLine_Initialized_TSConfig_with_help_test.go} | 2 +- ...onfig_with_incorrect_compiler_option_test.go} | 2 +- ...with_incorrect_compiler_option_value_test.go} | 2 +- ..._TSConfig_with_list_compiler_options_test.go} | 2 +- ...ist_compiler_options_with_enum_value_test.go} | 2 +- ...tialized_TSConfig_with_tsconfig_json_test.go} | 2 +- ..._commandLine_Parse_enum_type_options_test.go} | 2 +- ...Line_Parse_lib_option_with_file_name_test.go} | 2 +- ...p_test.go => tsc_commandLine_Parse_p_test.go} | 2 +- ...e_Parse_p_with_path_to_tsconfig_file_test.go} | 2 +- ...Parse_p_with_path_to_tsconfig_folder_test.go} | 2 +- ..._commandLine_Project_is_empty_string_test.go} | 2 +- ...e_adds_color_when_FORCE_COLOR_is_set_test.go} | 2 +- ...est.go => tsc_commandLine_bad_locale_test.go} | 2 +- ...OR_is_set_even_if_FORCE_COLOR_is_set_test.go} | 2 +- ...s_not_add_color_when_NO_COLOR_is_set_test.go} | 2 +- ..._test.go => tsc_commandLine_help_all_test.go} | 2 +- ...help_test.go => tsc_commandLine_help_test.go} | 2 +- ...le_test.go => tsc_commandLine_locale_test.go} | 2 +- ...us_DiagnosticsPresent_OutputsSkipped_test.go} | 2 +- ...n_host_cannot_provide_terminal_width_test.go} | 2 +- ... tsc_composite_converting_to_modules_test.go} | 2 +- ...from_CJS_module_error_on_jsx_element_test.go} | 2 +- ...m_CJS_module_no_crash_no_jsx_element_test.go} | 2 +- ..._line_but_has_tsbuild_info_in_config_test.go} | 2 +- ..._line_but_has_tsbuild_info_in_config_test.go} | 2 +- ...ting_composite_false_on_command_line_test.go} | 2 +- ...tting_composite_null_on_command_line_test.go} | 2 +- ...onEmit_reports_dts_generation_errors_test.go} | 2 +- ...s_generation_errors_with_incremental_test.go} | 2 +- ..._type_alias_across_a_module_boundary_test.go} | 2 +- ...ing_package_through_indirect_symlink_test.go} | 2 +- ...source_and_another_symlinked_package_test.go} | 2 +- ...symlinked_package_with_indirect_link_test.go} | 2 +- ..._Windows_paths_and_uppercase_letters_test.go} | 2 +- ...xtends_configDir_template_showConfig_test.go} | 2 +- ...go => tsc_extends_configDir_template_test.go} | 2 +- ..._configDir_template_with_commandline_test.go} | 2 +- ...sc_extends_resolves_the_symlink_path_test.go} | 2 +- ..._on_disk_that_differs_only_in_casing_test.go} | 2 +- ...ultiple_places_with_different_casing_test.go} | 2 +- ...ve_and_non_relative_file_resolutions_test.go} | 2 +- ...ames_with_triple_slash_ref_from_file_test.go} | 2 +- ...gInFileNames_with_type_ref_from_file_test.go} | 2 +- ...e_generateTrace_generates_types_file_test.go} | 2 +- ...ith_multiple_files_and_complex_types_test.go} | 2 +- ...gnoreConfig_mixing_project_and_files_test.go} | 2 +- ...ct_and_files_when_config_file_absent_test.go} | 2 +- ...config_file_absent_with_ignoreConfig_test.go} | 2 +- ..._project_and_files_with_ignoreConfig_test.go} | 2 +- ...=> tsc_ignoreConfig_specifying_files_test.go} | 2 +- ...ifying_files_when_config_file_absent_test.go} | 2 +- ...config_file_absent_with_ignoreConfig_test.go} | 2 +- ...g_specifying_files_with_ignoreConfig_test.go} | 2 +- ... tsc_ignoreConfig_specifying_project_test.go} | 2 +- ...ying_project_when_config_file_absent_test.go} | 2 +- ...config_file_absent_with_ignoreConfig_test.go} | 2 +- ...specifying_project_with_ignoreConfig_test.go} | 2 +- ...tsc_ignoreConfig_without_any_options_test.go} | 2 +- ..._any_options_when_config_file_absent_test.go} | 2 +- ...config_file_absent_with_ignoreConfig_test.go} | 2 +- ...ithout_any_options_with_ignoreConfig_test.go} | 2 +- ...tal_with_case_insensitive_file_names_test.go} | 2 +- ...o_modifier_of_class_expression_field_test.go} | 2 +- ..._field_with_declaration_emit_enabled_test.go} | 2 +- ...lobal_through_export_in_another_file_test.go} | 2 +- ...another_file_through_indirect_import_test.go} | 2 +- ...onst_enums_aliased_in_different_file_test.go} | 2 +- ... tsc_incremental_const_enums_aliased_test.go} | 2 +- ...st.go => tsc_incremental_const_enums_test.go} | 2 +- ...ncremental_const_enums_with_refCycle_test.go} | 2 +- ...emental_generates_typerefs_correctly_test.go} | 2 +- ...l_internal_symbolname_in_tsbuildInfo_test.go} | 2 +- ...import_in_jsdoc_in_composite_project_test.go} | 2 +- ...mental_option_changes_with_composite_test.go} | 2 +- ...ntal_option_changes_with_incremental_test.go} | 2 +- ..._no_backing_types_found_doesnt_crash_test.go} | 2 +- ...ypes_found_doesnt_crash_under_strict_test.go} | 2 +- ...mental_serializing_composite_project_test.go} | 2 +- ..._incremental_serializing_error_chain_test.go} | 2 +- ...sc_incremental_tsbuildinfo_has_error_test.go} | 2 +- ...tsc_incremental_when_file_is_deleted_test.go} | 2 +- ..._is_added_the_signatures_are_updated_test.go} | 2 +- ...ilename_for_buildinfo_on_commandline_test.go} | 2 +- ...hen_passing_rootDir_from_commandline_test.go} | 2 +- ...n_passing_rootDir_is_in_the_tsconfig_test.go} | 2 +- ...re_is_bind_diagnostics_thats_ignored_test.go} | 2 +- ... tsc_incremental_with_only_dts_files_test.go} | 2 +- ...=> tsc_libraryResolution_unknown_lib_test.go} | 2 +- ...libraryResolution_when_noLib_toggles_test.go} | 2 +- ...=> tsc_libraryResolution_with_config_test.go} | 2 +- ...tion_with_config_with_libReplacement_test.go} | 2 +- ...tFilesOnly_combined_with_incremental_test.go} | 2 +- ...t.go => tsc_listFilesOnly_loose_file_test.go} | 2 +- ...tsc_moduleResolution_alternateResult_test.go} | 2 +- ..._moduleResolution_package_json_scope_test.go} | 2 +- ...c_moduleResolution_pnpm_style_layout_test.go} | 2 +- ...rs_test.go => tsc_noCheck_dts_errors_test.go} | 2 +- ..._noCheck_dts_errors_with_incremental_test.go} | 2 +- ...st.go => tsc_noCheck_semantic_errors_test.go} | 2 +- ...eck_semantic_errors_with_incremental_test.go} | 2 +- ...test.go => tsc_noCheck_syntax_errors_test.go} | 2 +- ...Check_syntax_errors_with_incremental_test.go} | 2 +- ...t.go => tsc_noEmitOnError_dts_errors_test.go} | 2 +- ...tOnError_dts_errors_with_declaration_test.go} | 2 +- ...rs_with_declaration_with_incremental_test.go} | 2 +- ...tOnError_dts_errors_with_incremental_test.go} | 2 +- ...fore_fixing_error_with_noEmitOnError_test.go} | 2 +- ...=> tsc_noEmitOnError_semantic_errors_test.go} | 2 +- ...ror_semantic_errors_with_declaration_test.go} | 2 +- ...rs_with_declaration_with_incremental_test.go} | 2 +- ...ror_semantic_errors_with_incremental_test.go} | 2 +- ...o => tsc_noEmitOnError_syntax_errors_test.go} | 2 +- ...Error_syntax_errors_with_declaration_test.go} | 2 +- ...rs_with_declaration_with_incremental_test.go} | 2 +- ...Error_syntax_errors_with_incremental_test.go} | 2 +- ...tOnError_when_declarationMap_changes_test.go} | 2 +- ...t.go => tsc_noEmit_changes_composite_test.go} | 2 +- ...Emit_changes_incremental_declaration_test.go} | 2 +- ...go => tsc_noEmit_changes_incremental_test.go} | 2 +- ...hanges_with_initial_noEmit_composite_test.go} | 2 +- ...itial_noEmit_incremental_declaration_test.go} | 2 +- ...nges_with_initial_noEmit_incremental_test.go} | 2 +- ...ors_test.go => tsc_noEmit_dts_errors_test.go} | 2 +- ...n_enable_changes_with_multiple_files_test.go} | 2 +- ...s_errors_with_incremental_as_modules_test.go} | 2 +- ...c_noEmit_dts_errors_with_incremental_test.go} | 2 +- ...oEmit_dts_errors_without_dts_enabled_test.go} | 2 +- ..._enabled_with_incremental_as_modules_test.go} | 2 +- ...without_dts_enabled_with_incremental_test.go} | 2 +- ...est.go => tsc_noEmit_semantic_errors_test.go} | 2 +- ...c_errors_with_incremental_as_modules_test.go} | 2 +- ...mit_semantic_errors_with_incremental_test.go} | 2 +- ..._test.go => tsc_noEmit_syntax_errors_test.go} | 2 +- ...x_errors_with_incremental_as_modules_test.go} | 2 +- ...oEmit_syntax_errors_with_incremental_test.go} | 2 +- ..._noEmit_when_project_has_strict_true_test.go} | 2 +- ...rop_uses_referenced_project_settings_test.go} | 2 +- ..._default_setup_was_created_correctly_test.go} | 2 +- ...composite_if_its_a_container_project_test.go} | 2 +- ..._infer_the_rootDir_from_source_paths_test.go} | 2 +- ...s_when_a_file_is_outside_the_rootdir_test.go} | 2 +- ...rences_errors_when_declaration_false_test.go} | 2 +- ...when_the_file_list_is_not_exhaustive_test.go} | 2 +- ..._the_referenced_project_doesnt_exist_test.go} | 2 +- ...renced_project_doesnt_have_composite_test.go} | 2 +- ...eConstEnums_and_verbatimModuleSyntax_test.go} | 2 +- ...error_when_the_input_file_is_missing_test.go} | 2 +- ...hen_module_reference_is_not_relative_test.go} | 2 +- ...ces_redirects_to_the_output_dts_file_test.go} | 2 +- ..._disallows_synthetic_default_imports_test.go} | 2 +- ...nced_project_with_preserveConstEnums_test.go} | 2 +- ...veImportExtensionsProjectReferences1_test.go} | 2 +- ...veImportExtensionsProjectReferences2_test.go} | 2 +- ...veImportExtensionsProjectReferences3_test.go} | 2 +- ...t_contains_invalid_project_reference_test.go} | 2 +- ..._when_project_reference_is_not_built_test.go} | 2 +- ...rences_composite_project_with_noEmit_test.go} | 2 +- ...es_when_project_references_composite_test.go} | 2 +- ...wConfig_Default_initialized_TSConfig_test.go} | 2 +- ..._Show_TSConfig_with_advanced_options_test.go} | 2 +- ..._with_boolean_value_compiler_options_test.go} | 2 +- ...TSConfig_with_compileOnSave_and_more_test.go} | 2 +- ...fig_with_enum_value_compiler_options_test.go} | 2 +- ...how_TSConfig_with_exclude_and_outDir_test.go} | 2 +- ...howConfig_Show_TSConfig_with_exclude_test.go} | 2 +- ...Show_TSConfig_with_files_and_include_test.go} | 2 +- ...fig_Show_TSConfig_with_files_options_test.go} | 2 +- ...SConfig_with_include_filtering_files_test.go} | 2 +- ...onfig_with_incorrect_compiler_option_test.go} | 2 +- ...with_incorrect_compiler_option_value_test.go} | 2 +- ..._TSConfig_with_list_compiler_options_test.go} | 2 +- ...ist_compiler_options_with_enum_value_test.go} | 2 +- ...ig_Show_TSConfig_with_paths_and_more_test.go} | 2 +- ...Config_Show_TSConfig_with_references_test.go} | 2 +- ...ig_with_transitively_implied_options_test.go} | 2 +- ..._parse_tsconfig_with_typeAcquisition_test.go} | 2 +- 460 files changed, 470 insertions(+), 464 deletions(-) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go => tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_demo_updates_with_bad_reference_test.go => tsbuildWatch_demo_updates_with_bad_reference_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_demo_updates_with_circular_reference_test.go => tsbuildWatch_demo_updates_with_circular_reference_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_extends_configDir_template_test.go => tsbuildWatch_extends_configDir_template_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_libraryResolution_with_config_test.go => tsbuildWatch_libraryResolution_with_config_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go => tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go => tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go => tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go => tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmitOnError_noEmitOnError_test.go => tsbuildWatch_noEmitOnError_noEmitOnError_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go => tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go => tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go => tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go => tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go => tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_dts_errors_test.go => tsbuildWatch_noEmit_dts_errors_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go => tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_dts_errors_with_incremental_test.go => tsbuildWatch_noEmit_dts_errors_with_incremental_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go => tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go => tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go => tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_semantic_errors_test.go => tsbuildWatch_noEmit_semantic_errors_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go => tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go => tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_syntax_errors_test.go => tsbuildWatch_noEmit_syntax_errors_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go => tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go => tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go => tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go => tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go => tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go => tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go => tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go => tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go => tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go => tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_programUpdates_works_with_extended_source_files_test.go => tsbuildWatch_programUpdates_works_with_extended_source_files_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go => tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go => tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go => tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go => tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go => tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go => tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go => tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go => tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_reexport_Reports_errors_correctly_test.go => tsbuildWatch_reexport_Reports_errors_correctly_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go => tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go => tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go => tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go => tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go => tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go => tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go => tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go => tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go => tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go => tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go => tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go => tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go => tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go => tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go => tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go => tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go => tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_clean_file_name_and_output_name_clashing_test.go => tsbuild_clean_file_name_and_output_name_clashing_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsbuild_clean_tsx_with_dts_emit_test.go => tsbuild_clean_tsx_with_dts_emit_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_bad_locale_test.go => tsbuild_commandLine_bad_locale_test.go} (85%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_different_options_test.go => tsbuild_commandLine_different_options_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_different_options_with_incremental_test.go => tsbuild_commandLine_different_options_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go => tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go => tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go => tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go => tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go => tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go => tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_help_test.go => tsbuild_commandLine_help_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_locale_test.go => tsbuild_commandLine_locale_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsbuild_commandLine_when_build_not_first_argument_test.go => tsbuild_commandLine_when_build_not_first_argument_test.go} (82%) rename internal/execute/tsctests/tests/{Test_tsbuild_configFileErrors_missing_config_file_test.go => tsbuild_configFileErrors_missing_config_file_test.go} (82%) rename internal/execute/tsctests/tests/{Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go => tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go => tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_declarationEmit_reports_dts_generation_errors_test.go => tsbuild_declarationEmit_reports_dts_generation_errors_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go => tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go => tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go => tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go => tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go => tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go => tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_demo_in_circular_is_set_in_the_reference_test.go => tsbuild_demo_in_circular_is_set_in_the_reference_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go => tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go => tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go => tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go => tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_extends_configDir_template_test.go => tsbuild_extends_configDir_template_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_extends_resolves_the_symlink_path_test.go => tsbuild_extends_resolves_the_symlink_path_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go => tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go => tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_fileDelete_deleted_file_without_composite_test.go => tsbuild_fileDelete_deleted_file_without_composite_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_fileDelete_detects_deleted_file_test.go => tsbuild_fileDelete_detects_deleted_file_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go => tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go => tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go => tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go => tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go => tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go => tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go => tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_libraryResolution_with_config_test.go => tsbuild_libraryResolution_with_config_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_libraryResolution_with_config_with_libReplacement_test.go => tsbuild_libraryResolution_with_config_with_libReplacement_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go => tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go => tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go => tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go => tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go => tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go => tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuild_moduleResolution_when_resolution_is_not_shared_test.go => tsbuild_moduleResolution_when_resolution_is_not_shared_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go => tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go => tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_noCheck_dts_errors_test.go => tsbuild_noCheck_dts_errors_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_noCheck_dts_errors_with_incremental_test.go => tsbuild_noCheck_dts_errors_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_noCheck_semantic_errors_test.go => tsbuild_noCheck_semantic_errors_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_noCheck_semantic_errors_with_incremental_test.go => tsbuild_noCheck_semantic_errors_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_noCheck_syntax_errors_test.go => tsbuild_noCheck_syntax_errors_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_noCheck_syntax_errors_with_incremental_test.go => tsbuild_noCheck_syntax_errors_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_dts_errors_test.go => tsbuild_noEmitOnError_dts_errors_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_dts_errors_with_declaration_test.go => tsbuild_noEmitOnError_dts_errors_with_declaration_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go => tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_dts_errors_with_incremental_test.go => tsbuild_noEmitOnError_dts_errors_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_semantic_errors_test.go => tsbuild_noEmitOnError_semantic_errors_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go => tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go => tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go => tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_syntax_errors_test.go => tsbuild_noEmitOnError_syntax_errors_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go => tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go => tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go => tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_changes_composite_test.go => tsbuild_noEmit_changes_composite_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_changes_incremental_declaration_test.go => tsbuild_noEmit_changes_incremental_declaration_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_changes_incremental_test.go => tsbuild_noEmit_changes_incremental_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go => tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go => tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go => tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_test.go => tsbuild_noEmit_dts_errors_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go => tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go => tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go => tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go => tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go => tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_with_incremental_test.go => tsbuild_noEmit_dts_errors_with_incremental_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_without_dts_enabled_test.go => tsbuild_noEmit_dts_errors_without_dts_enabled_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go => tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go => tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_semantic_errors_test.go => tsbuild_noEmit_semantic_errors_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go => tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_semantic_errors_with_incremental_test.go => tsbuild_noEmit_semantic_errors_with_incremental_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_syntax_errors_test.go => tsbuild_noEmit_syntax_errors_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go => tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_noEmit_syntax_errors_with_incremental_test.go => tsbuild_noEmit_syntax_errors_with_incremental_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go => tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuild_outputPaths_when_rootDir_is_not_specified_test.go => tsbuild_outputPaths_when_rootDir_is_not_specified_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go => tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go => tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuild_outputPaths_when_rootDir_is_specified_test.go => tsbuild_outputPaths_when_rootDir_is_specified_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go => tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go => tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go => tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go => tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go => tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go => tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go => tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go => tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go => tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go => tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go => tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go => tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go => tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go => tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go => tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go => tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go => tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go => tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_files_containing_json_file_test.go => tsbuild_resolveJsonModule_files_containing_json_file_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go => tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_and_files_non_composite_test.go => tsbuild_resolveJsonModule_include_and_files_non_composite_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_and_files_test.go => tsbuild_resolveJsonModule_include_and_files_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go => tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go => tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go => tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go => tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_only_non_composite_test.go => tsbuild_resolveJsonModule_include_only_non_composite_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_only_test.go => tsbuild_resolveJsonModule_include_only_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go => tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go => tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go => tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go => tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go => tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_include_only_without_outDir_test.go => tsbuild_resolveJsonModule_include_only_without_outDir_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_sourcemap_non_composite_test.go => tsbuild_resolveJsonModule_sourcemap_non_composite_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_sourcemap_test.go => tsbuild_resolveJsonModule_sourcemap_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_without_outDir_non_composite_test.go => tsbuild_resolveJsonModule_without_outDir_non_composite_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_resolveJsonModule_without_outDir_test.go => tsbuild_resolveJsonModule_without_outDir_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go => tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_roots_when_files_are_not_consecutive_test.go => tsbuild_roots_when_files_are_not_consecutive_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_roots_when_multiple_root_files_are_consecutive_test.go => tsbuild_roots_when_multiple_root_files_are_consecutive_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go => tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_roots_when_root_file_is_from_referenced_project_test.go => tsbuild_roots_when_root_file_is_from_referenced_project_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_roots_when_two_root_files_are_consecutive_test.go => tsbuild_roots_when_two_root_files_are_consecutive_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_always_builds_under_with_force_option_test.go => tsbuild_sample_always_builds_under_with_force_option_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go => tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go => tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go => tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go => tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go => tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go => tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go => tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go => tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_explainFiles_test.go => tsbuild_sample_explainFiles_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go => tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_listEmittedFiles_test.go => tsbuild_sample_listEmittedFiles_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_listFiles_test.go => tsbuild_sample_listFiles_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go => tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go => tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go => tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_removes_all_files_it_built_test.go => tsbuild_sample_removes_all_files_it_built_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_reports_error_if_input_file_is_missing_test.go => tsbuild_sample_reports_error_if_input_file_is_missing_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go => tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_sample_test.go => tsbuild_sample_sample_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go => tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go => tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_tsbuildinfo_has_error_test.go => tsbuild_sample_tsbuildinfo_has_error_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_when_declarationMap_changes_test.go => tsbuild_sample_when_declarationMap_changes_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_when_declaration_option_changes_test.go => tsbuild_sample_when_declaration_option_changes_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_when_esModuleInterop_option_changes_test.go => tsbuild_sample_when_esModuleInterop_option_changes_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go => tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go => tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_when_module_option_changes_test.go => tsbuild_sample_when_module_option_changes_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_sample_when_target_option_changes_test.go => tsbuild_sample_when_target_option_changes_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go => tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go => tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go => tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsbuild_solution_when_solution_is_referenced_indirectly_test.go => tsbuild_solution_when_solution_is_referenced_indirectly_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsbuild_transitiveReferences_builds_correctly_test.go => tsbuild_transitiveReferences_builds_correctly_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go => tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go => tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go => tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go => tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go => tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go => tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go => tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go => tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go => tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go => tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go => tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go => tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go => tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go => tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go => tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go => tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go => tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go => tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go => tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go => tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go => tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go => tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go => tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go => tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go => tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go => tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go => tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go => tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go => tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go} (85%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go => tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go} (85%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go => tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go => tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go} (81%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLine_Parse_watch_interval_option_test.go => tscWatch_commandLine_Parse_watch_interval_option_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go => tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go} (79%) rename internal/execute/tsctests/tests/{Test_tscWatch_noEmit_dts_errors_test.go => tscWatch_noEmit_dts_errors_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tscWatch_noEmit_dts_errors_without_dts_enabled_test.go => tscWatch_noEmit_dts_errors_without_dts_enabled_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tscWatch_noEmit_semantic_errors_test.go => tscWatch_noEmit_semantic_errors_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tscWatch_noEmit_syntax_errors_test.go => tscWatch_noEmit_syntax_errors_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go => tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go => tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go} (83%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go => tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go} (79%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go => tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go} (80%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_files_options_test.go => tsc_commandLine_Initialized_TSConfig_with_files_options_test.go} (82%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_help_test.go => tsc_commandLine_Initialized_TSConfig_with_help_test.go} (82%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go => tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go} (80%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go => tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go} (80%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go => tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go} (80%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go => tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go} (78%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go => tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Parse_enum_type_options_test.go => tsc_commandLine_Parse_enum_type_options_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Parse_lib_option_with_file_name_test.go => tsc_commandLine_Parse_lib_option_with_file_name_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Parse_p_test.go => tsc_commandLine_Parse_p_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go => tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go => tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_Project_is_empty_string_test.go => tsc_commandLine_Project_is_empty_string_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go => tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go} (81%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_bad_locale_test.go => tsc_commandLine_bad_locale_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go => tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go} (78%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go => tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go} (81%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_help_all_test.go => tsc_commandLine_help_all_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_help_test.go => tsc_commandLine_help_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_locale_test.go => tsc_commandLine_locale_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go => tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go} (79%) rename internal/execute/tsctests/tests/{Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go => tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go} (71%) rename internal/execute/tsctests/tests/{Test_tsc_composite_converting_to_modules_test.go => tsc_composite_converting_to_modules_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go => tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go => tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go => tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go} (85%) rename internal/execute/tsctests/tests/{Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go => tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsc_composite_when_setting_composite_false_on_command_line_test.go => tsc_composite_when_setting_composite_false_on_command_line_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_composite_when_setting_composite_null_on_command_line_test.go => tsc_composite_when_setting_composite_null_on_command_line_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_declarationEmit_reports_dts_generation_errors_test.go => tsc_declarationEmit_reports_dts_generation_errors_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go => tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go => tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go => tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go => tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go => tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go => tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_extends_configDir_template_showConfig_test.go => tsc_extends_configDir_template_showConfig_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_extends_configDir_template_test.go => tsc_extends_configDir_template_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_extends_configDir_template_with_commandline_test.go => tsc_extends_configDir_template_with_commandline_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_extends_resolves_the_symlink_path_test.go => tsc_extends_resolves_the_symlink_path_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go => tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go} (84%) rename internal/execute/tsctests/tests/{Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go => tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go => tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go => tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go} (85%) rename internal/execute/tsctests/tests/{Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go => tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_generateTrace_generateTrace_generates_types_file_test.go => tsc_generateTrace_generateTrace_generates_types_file_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go => tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_mixing_project_and_files_test.go => tsc_ignoreConfig_mixing_project_and_files_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go => tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go => tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go} (85%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go => tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_specifying_files_test.go => tsc_ignoreConfig_specifying_files_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go => tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go => tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go} (85%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go => tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_specifying_project_test.go => tsc_ignoreConfig_specifying_project_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go => tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go => tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go} (85%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go => tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_without_any_options_test.go => tsc_ignoreConfig_without_any_options_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go => tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go} (86%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go => tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go} (85%) rename internal/execute/tsctests/tests/{Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go => tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go => tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_change_to_modifier_of_class_expression_field_test.go => tsc_incremental_change_to_modifier_of_class_expression_field_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go => tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go => tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go => tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_const_enums_aliased_in_different_file_test.go => tsc_incremental_const_enums_aliased_in_different_file_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_const_enums_aliased_test.go => tsc_incremental_const_enums_aliased_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_const_enums_test.go => tsc_incremental_const_enums_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_const_enums_with_refCycle_test.go => tsc_incremental_const_enums_with_refCycle_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_generates_typerefs_correctly_test.go => tsc_incremental_generates_typerefs_correctly_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go => tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go => tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_option_changes_with_composite_test.go => tsc_incremental_option_changes_with_composite_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_option_changes_with_incremental_test.go => tsc_incremental_option_changes_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go => tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go => tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_serializing_composite_project_test.go => tsc_incremental_serializing_composite_project_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_serializing_error_chain_test.go => tsc_incremental_serializing_error_chain_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_tsbuildinfo_has_error_test.go => tsc_incremental_tsbuildinfo_has_error_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_when_file_is_deleted_test.go => tsc_incremental_when_file_is_deleted_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go => tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go => tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_when_passing_rootDir_from_commandline_test.go => tsc_incremental_when_passing_rootDir_from_commandline_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go => tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go => tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_incremental_with_only_dts_files_test.go => tsc_incremental_with_only_dts_files_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_libraryResolution_unknown_lib_test.go => tsc_libraryResolution_unknown_lib_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_libraryResolution_when_noLib_toggles_test.go => tsc_libraryResolution_when_noLib_toggles_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_libraryResolution_with_config_test.go => tsc_libraryResolution_with_config_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsc_libraryResolution_with_config_with_libReplacement_test.go => tsc_libraryResolution_with_config_with_libReplacement_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsc_listFilesOnly_combined_with_incremental_test.go => tsc_listFilesOnly_combined_with_incremental_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsc_listFilesOnly_loose_file_test.go => tsc_listFilesOnly_loose_file_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_moduleResolution_alternateResult_test.go => tsc_moduleResolution_alternateResult_test.go} (99%) rename internal/execute/tsctests/tests/{Test_tsc_moduleResolution_package_json_scope_test.go => tsc_moduleResolution_package_json_scope_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_moduleResolution_pnpm_style_layout_test.go => tsc_moduleResolution_pnpm_style_layout_test.go} (99%) rename internal/execute/tsctests/tests/{Test_tsc_noCheck_dts_errors_test.go => tsc_noCheck_dts_errors_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsc_noCheck_dts_errors_with_incremental_test.go => tsc_noCheck_dts_errors_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsc_noCheck_semantic_errors_test.go => tsc_noCheck_semantic_errors_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsc_noCheck_semantic_errors_with_incremental_test.go => tsc_noCheck_semantic_errors_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsc_noCheck_syntax_errors_test.go => tsc_noCheck_syntax_errors_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsc_noCheck_syntax_errors_with_incremental_test.go => tsc_noCheck_syntax_errors_with_incremental_test.go} (97%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_dts_errors_test.go => tsc_noEmitOnError_dts_errors_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_dts_errors_with_declaration_test.go => tsc_noEmitOnError_dts_errors_with_declaration_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go => tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_dts_errors_with_incremental_test.go => tsc_noEmitOnError_dts_errors_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go => tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_semantic_errors_test.go => tsc_noEmitOnError_semantic_errors_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_semantic_errors_with_declaration_test.go => tsc_noEmitOnError_semantic_errors_with_declaration_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go => tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_semantic_errors_with_incremental_test.go => tsc_noEmitOnError_semantic_errors_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_syntax_errors_test.go => tsc_noEmitOnError_syntax_errors_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_syntax_errors_with_declaration_test.go => tsc_noEmitOnError_syntax_errors_with_declaration_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go => tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_syntax_errors_with_incremental_test.go => tsc_noEmitOnError_syntax_errors_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_noEmitOnError_when_declarationMap_changes_test.go => tsc_noEmitOnError_when_declarationMap_changes_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_changes_composite_test.go => tsc_noEmit_changes_composite_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_changes_incremental_declaration_test.go => tsc_noEmit_changes_incremental_declaration_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_changes_incremental_test.go => tsc_noEmit_changes_incremental_test.go} (98%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_changes_with_initial_noEmit_composite_test.go => tsc_noEmit_changes_with_initial_noEmit_composite_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go => tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_changes_with_initial_noEmit_incremental_test.go => tsc_noEmit_changes_with_initial_noEmit_incremental_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_dts_errors_test.go => tsc_noEmit_dts_errors_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go => tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_dts_errors_with_incremental_as_modules_test.go => tsc_noEmit_dts_errors_with_incremental_as_modules_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_dts_errors_with_incremental_test.go => tsc_noEmit_dts_errors_with_incremental_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_dts_errors_without_dts_enabled_test.go => tsc_noEmit_dts_errors_without_dts_enabled_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go => tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go => tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_semantic_errors_test.go => tsc_noEmit_semantic_errors_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go => tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_semantic_errors_with_incremental_test.go => tsc_noEmit_semantic_errors_with_incremental_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_syntax_errors_test.go => tsc_noEmit_syntax_errors_test.go} (96%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go => tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_syntax_errors_with_incremental_test.go => tsc_noEmit_syntax_errors_with_incremental_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_noEmit_when_project_has_strict_true_test.go => tsc_noEmit_when_project_has_strict_true_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go => tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go} (95%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_default_setup_was_created_correctly_test.go => tsc_projectReferences_default_setup_was_created_correctly_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go => tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go => tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go => tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_errors_when_declaration_false_test.go => tsc_projectReferences_errors_when_declaration_false_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go => tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go => tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go => tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go => tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go => tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go => tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go} (88%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_redirects_to_the_output_dts_file_test.go => tsc_projectReferences_redirects_to_the_output_dts_file_test.go} (92%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go => tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go => tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go => tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go => tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go => tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go} (93%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_when_project_contains_invalid_project_reference_test.go => tsc_projectReferences_when_project_contains_invalid_project_reference_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_when_project_reference_is_not_built_test.go => tsc_projectReferences_when_project_reference_is_not_built_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go => tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go} (89%) rename internal/execute/tsctests/tests/{Test_tsc_projectReferences_when_project_references_composite_test.go => tsc_projectReferences_when_project_references_composite_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Default_initialized_TSConfig_test.go => tsc_showConfig_Default_initialized_TSConfig_test.go} (82%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_advanced_options_test.go => tsc_showConfig_Show_TSConfig_with_advanced_options_test.go} (84%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go => tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go} (80%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go => tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go => tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go} (81%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go => tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_exclude_test.go => tsc_showConfig_Show_TSConfig_with_exclude_test.go} (91%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_files_and_include_test.go => tsc_showConfig_Show_TSConfig_with_files_and_include_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_files_options_test.go => tsc_showConfig_Show_TSConfig_with_files_options_test.go} (83%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go => tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go => tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go} (81%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go => tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go} (81%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go => tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go} (82%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go => tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go} (80%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go => tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go} (94%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_references_test.go => tsc_showConfig_Show_TSConfig_with_references_test.go} (90%) rename internal/execute/tsctests/tests/{Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go => tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go} (87%) rename internal/execute/tsctests/tests/{Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go => tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go} (89%) diff --git a/internal/execute/tsctests/extract.go b/internal/execute/tsctests/extract.go index f4b3c0e435f..d9f14b3bf24 100644 --- a/internal/execute/tsctests/extract.go +++ b/internal/execute/tsctests/extract.go @@ -107,7 +107,9 @@ func (test *tscInput) writeTestSourceFile(scenario string, editOps [][]capturedE if err := os.MkdirAll(outDir, 0o755); err != nil { panic(fmt.Errorf("tsctests: failed to create %s: %w", outDir, err)) } - outPath := filepath.Join(outDir, funcName+"_test.go") + testFileName := funcName + "_test.go" + testFileName = strings.ToLower(testFileName[:1]) + testFileName[1:] + outPath := filepath.Join(outDir, testFileName) if existing, err := os.ReadFile(outPath); err == nil && string(existing) == source { return } @@ -134,7 +136,7 @@ func (test *tscInput) renderTestSource(scenario string, funcName string, editOps b.WriteString(")\n") b.WriteString("\n") - fmt.Fprintf(&b, "func %s(t *testing.T) {\n", funcName) + fmt.Fprintf(&b, "func Test%s(t *testing.T) {\n", funcName) b.WriteString("\ttest := &tsctests.TestSpec{\n") fmt.Fprintf(&b, "\t\tScenario: %s,\n", strconv.Quote(scenario)) fmt.Fprintf(&b, "\t\tSubScenario: %s,\n", strconv.Quote(test.subScenario)) @@ -313,15 +315,19 @@ var ( // appends a short hash suffix when the sanitized result would be ambiguous. func makeTestFuncName(parts ...string) string { var b strings.Builder - b.WriteString("Test") joinedRaw := strings.Join(parts, "/") - for _, p := range parts { + for i, p := range parts { sanitized := identSanitizer.ReplaceAllString(p, "_") sanitized = strings.Trim(sanitized, "_") if sanitized == "" { continue } - b.WriteByte('_') + if i != 0 { + b.WriteByte('_') + } else { + sanitized = strings.ToUpper(sanitized[:1]) + sanitized[1:] // Test function must start with uppercase + } + b.WriteString(sanitized) } diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go b/internal/execute/tsctests/tests/tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go index 41c0f274023..43687b754c5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file(t *testing.T) { +func TestTsbuildWatch_configFileErrors_reports_syntax_errors_in_config_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "configFileErrors", SubScenario: "reports syntax errors in config file", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_bad_reference_test.go b/internal/execute/tsctests/tests/tsbuildWatch_demo_updates_with_bad_reference_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_bad_reference_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_demo_updates_with_bad_reference_test.go index 20343c8b8cf..c633eac1591 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_bad_reference_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_demo_updates_with_bad_reference_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_demo_updates_with_bad_reference(t *testing.T) { +func TestTsbuildWatch_demo_updates_with_bad_reference(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "demo", SubScenario: "updates with bad reference", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_circular_reference_test.go b/internal/execute/tsctests/tests/tsbuildWatch_demo_updates_with_circular_reference_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_circular_reference_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_demo_updates_with_circular_reference_test.go index 69fe1e981c6..cbd3d986f7a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_demo_updates_with_circular_reference_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_demo_updates_with_circular_reference_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_demo_updates_with_circular_reference(t *testing.T) { +func TestTsbuildWatch_demo_updates_with_circular_reference(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "demo", SubScenario: "updates with circular reference", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_extends_configDir_template_test.go b/internal/execute/tsctests/tests/tsbuildWatch_extends_configDir_template_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_extends_configDir_template_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_extends_configDir_template_test.go index e6ebf759f81..44838039044 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_extends_configDir_template_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_extends_configDir_template_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_extends_configDir_template(t *testing.T) { +func TestTsbuildWatch_extends_configDir_template(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "extends", SubScenario: "configDir template", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_test.go b/internal/execute/tsctests/tests/tsbuildWatch_libraryResolution_with_config_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_libraryResolution_with_config_test.go index 045b8f766b9..28f74054a77 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_libraryResolution_with_config_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_libraryResolution_with_config(t *testing.T) { +func TestTsbuildWatch_libraryResolution_with_config(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "libraryResolution", SubScenario: "with config", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go b/internal/execute/tsctests/tests/tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go index 033091337bc..e5be64d4fa1 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_libraryResolution_with_config_with_libReplacement_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_libraryResolution_with_config_with_libReplacement(t *testing.T) { +func TestTsbuildWatch_libraryResolution_with_config_with_libReplacement(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "libraryResolution", SubScenario: "with config with libReplacement", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go b/internal/execute/tsctests/tests/tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go index 52696bd46c0..1ec16f5bfdb 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields(t *testing.T) { +func TestTsbuildWatch_moduleResolution_build_mode_watches_for_changes_to_package_json_main_fields(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "build mode watches for changes to package-json main fields", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go b/internal/execute/tsctests/tests/tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go index 23296ada783..1502509ecc2 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings(t *testing.T) { +func TestTsbuildWatch_moduleResolution_handles_the_cache_correctly_when_two_projects_use_different_module_resolution_settings(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "handles the cache correctly when two projects use different module resolution settings", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go b/internal/execute/tsctests/tests/tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go index febc97498b4..e2fd2f3529f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions(t *testing.T) { +func TestTsbuildWatch_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_cts_and_mts_extensions(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "resolves specifier in output declaration file from referenced project correctly with cts and mts extensions", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_test.go index 67c4778eee3..afd490b634f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmitOnError_noEmitOnError(t *testing.T) { +func TestTsbuildWatch_noEmitOnError_noEmitOnError(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "noEmitOnError", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go index 95db3640323..63a1ae55ef4 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration(t *testing.T) { +func TestTsbuildWatch_noEmitOnError_noEmitOnError_with_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "noEmitOnError with declaration", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go index 76fd2dfd957..5e6a9e78051 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental(t *testing.T) { +func TestTsbuildWatch_noEmitOnError_noEmitOnError_with_declaration_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "noEmitOnError with declaration with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go index d83ca2fff4c..49fac3b4b8b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmitOnError_noEmitOnError_with_incremental(t *testing.T) { +func TestTsbuildWatch_noEmitOnError_noEmitOnError_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "noEmitOnError with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go index 82974608a7f..d328156b046 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted(t *testing.T) { +func TestTsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "does not go in loop when watching when no files are emitted", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go index 0cb60057612..5aec18aa6de 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental(t *testing.T) { +func TestTsbuildWatch_noEmit_does_not_go_in_loop_when_watching_when_no_files_are_emitted_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "does not go in loop when watching when no files are emitted with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_test.go index ed897e748fa..92a65664403 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_dts_errors(t *testing.T) { +func TestTsbuildWatch_noEmit_dts_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go index 94e36bfe37c..280469f2339 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_dts_errors_with_incremental_as_modules(t *testing.T) { +func TestTsbuildWatch_noEmit_dts_errors_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_with_incremental_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_with_incremental_test.go index 9bf8c6cdf4a..0251e6b82a2 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_dts_errors_with_incremental(t *testing.T) { +func TestTsbuildWatch_noEmit_dts_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go index bb6dacab43b..aac826c0468 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_without_dts_enabled_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled(t *testing.T) { +func TestTsbuildWatch_noEmit_dts_errors_without_dts_enabled(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go index ee988af242e..c083dcdddb1 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules(t *testing.T) { +func TestTsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go index 5527fbf6ee5..fcef5c62d85 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental(t *testing.T) { +func TestTsbuildWatch_noEmit_dts_errors_without_dts_enabled_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_semantic_errors_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_semantic_errors_test.go index dfe36ba4666..c024c33b1e2 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_semantic_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_semantic_errors(t *testing.T) { +func TestTsbuildWatch_noEmit_semantic_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go index 68d923cfce3..1a1d74148cc 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules(t *testing.T) { +func TestTsbuildWatch_noEmit_semantic_errors_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go index 9384c0efbfd..6c1c51118e5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_semantic_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_semantic_errors_with_incremental(t *testing.T) { +func TestTsbuildWatch_noEmit_semantic_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_syntax_errors_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_syntax_errors_test.go index 4c32ed8469c..19bc5ff527b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_syntax_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_syntax_errors(t *testing.T) { +func TestTsbuildWatch_noEmit_syntax_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go index 509d4dd2d8e..0f83de27ec7 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules(t *testing.T) { +func TestTsbuildWatch_noEmit_syntax_errors_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go index f823412cc21..13aea1eceb1 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_noEmit_syntax_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_noEmit_syntax_errors_with_incremental(t *testing.T) { +func TestTsbuildWatch_noEmit_syntax_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go index 5192a008801..0dd1dbbf92a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes(t *testing.T) { +func TestTsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_file_with_no_error_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "declarationEmitErrors introduceError when file with no error changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go index 8cedb4e6bb2..f0f9936f809 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted(t *testing.T) { +func TestTsbuildWatch_programUpdates_declarationEmitErrors_introduceError_when_fixing_errors_only_changed_file_is_emitted(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "declarationEmitErrors introduceError when fixing errors only changed file is emitted", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go index 6174663aa42..93ecc59fcfb 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes(t *testing.T) { +func TestTsbuildWatch_programUpdates_declarationEmitErrors_when_file_with_no_error_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "declarationEmitErrors when file with no error changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go index fad9e0c3130..6c8afdc8948 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted(t *testing.T) { +func TestTsbuildWatch_programUpdates_declarationEmitErrors_when_fixing_error_files_all_files_are_emitted(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "declarationEmitErrors when fixing error files all files are emitted", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go index d537d30db94..a9828420133 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_tsbuildinfo_has_error_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_programUpdates_tsbuildinfo_has_error(t *testing.T) { +func TestTsbuildWatch_programUpdates_tsbuildinfo_has_error(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "tsbuildinfo has error", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go index 3ff2177dab3..0047b568761 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it(t *testing.T) { +func TestTsbuildWatch_programUpdates_when_referenced_project_change_introduces_error_in_the_down_stream_project_and_then_fixes_it(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "when referenced project change introduces error in the down stream project and then fixes it", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go index d51bde3dedd..61064a437d3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed(t *testing.T) { +func TestTsbuildWatch_programUpdates_works_correctly_when_project_with_extended_config_is_removed(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "works correctly when project with extended config is removed", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go index 466b4248603..bed7d3c119e 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false(t *testing.T) { +func TestTsbuildWatch_programUpdates_works_when_noUnusedParameters_changes_to_false(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "works when noUnusedParameters changes to false", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_with_extended_source_files_test.go b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_works_with_extended_source_files_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_with_extended_source_files_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_programUpdates_works_with_extended_source_files_test.go index 848404b55ab..ffc536c97f5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_programUpdates_works_with_extended_source_files_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_programUpdates_works_with_extended_source_files_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_programUpdates_works_with_extended_source_files(t *testing.T) { +func TestTsbuildWatch_programUpdates_works_with_extended_source_files(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "works with extended source files", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go index fc3a341d2e5..16a9542960a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution(t *testing.T) { +func TestTsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 23 projects in a solution", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go index 4a199682fd0..da8e03aff95 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3(t *testing.T) { +func TestTsbuildWatch_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 23 projects in a solution with --builders 3", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go index 360535a1042..050c8dcf67e 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution(t *testing.T) { +func TestTsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 3 projects in a solution", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go index eb6a5962305..ed480d0b4a7 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1(t *testing.T) { +func TestTsbuildWatch_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 3 projects in a solution with --builders 1", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go index 5c65bd2a0d6..2aa872d1eec 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution(t *testing.T) { +func TestTsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 5 projects in a solution", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go index 1183de9db2b..fee7cdc0c11 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2(t *testing.T) { +func TestTsbuildWatch_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 5 projects in a solution with --builders 2", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go index 224a90cc20c..a80de8ec2b4 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution(t *testing.T) { +func TestTsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 8 projects in a solution", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go index 80c3ba93112..7f0cb272c7f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3(t *testing.T) { +func TestTsbuildWatch_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 8 projects in a solution with --builders 3", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_reexport_Reports_errors_correctly_test.go b/internal/execute/tsctests/tests/tsbuildWatch_reexport_Reports_errors_correctly_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_reexport_Reports_errors_correctly_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_reexport_Reports_errors_correctly_test.go index a6d82e6be6a..1f1581d05ec 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_reexport_Reports_errors_correctly_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_reexport_Reports_errors_correctly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_reexport_Reports_errors_correctly(t *testing.T) { +func TestTsbuildWatch_reexport_Reports_errors_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "reexport", SubScenario: "Reports errors correctly", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go b/internal/execute/tsctests/tests/tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go index 67c8b1f0622..cb8f92618a4 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first(t *testing.T) { +func TestTsbuildWatch_roots_when_root_file_is_from_referenced_project_and_shared_is_first(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "roots", SubScenario: "when root file is from referenced project and shared is first", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go b/internal/execute/tsctests/tests/tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go index d7fbfb34d9f..22b535519d5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_roots_when_root_file_is_from_referenced_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_roots_when_root_file_is_from_referenced_project(t *testing.T) { +func TestTsbuildWatch_roots_when_root_file_is_from_referenced_project(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "roots", SubScenario: "when root file is from referenced project", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go index e3b187cbf17..5a3e21e3932 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates(t *testing.T) { +func TestTsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "builds when new file is added, and its subsequent updates", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go index f0dcdbd5456..27908a80f30 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references(t *testing.T) { +func TestTsbuildWatch_sample_builds_when_new_file_is_added_and_its_subsequent_updates_with_circular_references(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "builds when new file is added, and its subsequent updates with circular references", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go index e298012d2a8..0149387d493 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message(t *testing.T) { +func TestTsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "change builds changes and reports found errors message", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go index 297a653a3b9..5ab7221bb55 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references(t *testing.T) { +func TestTsbuildWatch_sample_change_builds_changes_and_reports_found_errors_message_with_circular_references(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "change builds changes and reports found errors message with circular references", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go index d87e4c9e29e..ecd0f01e7f0 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_incremental_updates_in_verbose_mode_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_incremental_updates_in_verbose_mode(t *testing.T) { +func TestTsbuildWatch_sample_incremental_updates_in_verbose_mode(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "incremental updates in verbose mode", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go index e262b8c89c1..90624d25c77 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects(t *testing.T) { +func TestTsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "non local change does not start build of referencing projects", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go index 22f93a4e8b1..2b34cc7f684 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references(t *testing.T) { +func TestTsbuildWatch_sample_non_local_change_does_not_start_build_of_referencing_projects_with_circular_references(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "non local change does not start build of referencing projects with circular references", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go index f4d35359857..5e7f270258f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used(t *testing.T) { +func TestTsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_not_used(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "reportErrors when preserveWatchOutput is not used", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go index 8f1396bdcbd..dcabc643f0b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line(t *testing.T) { +func TestTsbuildWatch_sample_reportErrors_when_preserveWatchOutput_is_passed_on_command_line(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "reportErrors when preserveWatchOutput is passed on command line", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go index c5dc3b9d4a7..0097d642f25 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line(t *testing.T) { +func TestTsbuildWatch_sample_reportErrors_when_stopBuildOnErrors_is_passed_on_command_line(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "reportErrors when stopBuildOnErrors is passed on command line", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go index bfd3ee9b493..bee559a28f8 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit(t *testing.T) { +func TestTsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "should not trigger recompilation because of program emit", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go index 4b6aaaa5d92..40edaa08c11 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified(t *testing.T) { +func TestTsbuildWatch_sample_should_not_trigger_recompilation_because_of_program_emit_with_outDir_specified(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "should not trigger recompilation because of program emit with outDir specified", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go index a78978e07a0..86a14fb7a34 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors(t *testing.T) { +func TestTsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go index 8939b49f811..2ec1612f90e 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core(t *testing.T) { +func TestTsbuildWatch_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors when test does not reference core", diff --git a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go b/internal/execute/tsctests/tests/tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go rename to internal/execute/tsctests/tests/tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go index 2c0dea3438e..d8e09f8c1e6 100644 --- a/internal/execute/tsctests/tests/Test_tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go +++ b/internal/execute/tsctests/tests/tsbuildWatch_sample_watches_config_files_that_are_not_present_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuildWatch_sample_watches_config_files_that_are_not_present(t *testing.T) { +func TestTsbuildWatch_sample_watches_config_files_that_are_not_present(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "watches config files that are not present", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_clean_file_name_and_output_name_clashing_test.go b/internal/execute/tsctests/tests/tsbuild_clean_file_name_and_output_name_clashing_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsbuild_clean_file_name_and_output_name_clashing_test.go rename to internal/execute/tsctests/tests/tsbuild_clean_file_name_and_output_name_clashing_test.go index 46b36b7b881..2d7992ca77b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_clean_file_name_and_output_name_clashing_test.go +++ b/internal/execute/tsctests/tests/tsbuild_clean_file_name_and_output_name_clashing_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_clean_file_name_and_output_name_clashing(t *testing.T) { +func TestTsbuild_clean_file_name_and_output_name_clashing(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "clean", SubScenario: "file name and output name clashing", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_clean_tsx_with_dts_emit_test.go b/internal/execute/tsctests/tests/tsbuild_clean_tsx_with_dts_emit_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_clean_tsx_with_dts_emit_test.go rename to internal/execute/tsctests/tests/tsbuild_clean_tsx_with_dts_emit_test.go index afec0e0b53c..d3cd6b0edff 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_clean_tsx_with_dts_emit_test.go +++ b/internal/execute/tsctests/tests/tsbuild_clean_tsx_with_dts_emit_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_clean_tsx_with_dts_emit(t *testing.T) { +func TestTsbuild_clean_tsx_with_dts_emit(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "clean", SubScenario: "tsx with dts emit", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_bad_locale_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_bad_locale_test.go similarity index 85% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_bad_locale_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_bad_locale_test.go index 38229b1344c..d99bda664f9 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_bad_locale_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_bad_locale_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_bad_locale(t *testing.T) { +func TestTsbuild_commandLine_bad_locale(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "bad locale", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_different_options_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_different_options_test.go index 11afa2d43ad..8de820f15b8 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_different_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_different_options(t *testing.T) { +func TestTsbuild_commandLine_different_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "different options", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_different_options_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_different_options_with_incremental_test.go index 9ebd7cc4637..9cbf3c1394e 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_different_options_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_different_options_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_different_options_with_incremental(t *testing.T) { +func TestTsbuild_commandLine_different_options_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "different options with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go index c940c44c2e4..ddf72eafedb 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline(t *testing.T) { +func TestTsbuild_commandLine_emitDeclarationOnly_false_on_commandline(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "emitDeclarationOnly false on commandline", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go index 234325e71e1..05fd2b02118 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental(t *testing.T) { +func TestTsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_and_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "emitDeclarationOnly false on commandline with declaration and incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go index cab8cacfe5e..a08bb4bf95a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration(t *testing.T) { +func TestTsbuild_commandLine_emitDeclarationOnly_false_on_commandline_with_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "emitDeclarationOnly false on commandline with declaration", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go index f4c34417033..07098f38f72 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_on_commandline_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline(t *testing.T) { +func TestTsbuild_commandLine_emitDeclarationOnly_on_commandline(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "emitDeclarationOnly on commandline", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go index 8ab262bcd7f..5cdbb1a1b4a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental(t *testing.T) { +func TestTsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_and_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "emitDeclarationOnly on commandline with declaration and incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go index e4a0872a3fd..66ab23e643d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration(t *testing.T) { +func TestTsbuild_commandLine_emitDeclarationOnly_on_commandline_with_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "emitDeclarationOnly on commandline with declaration", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_help_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_help_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_help_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_help_test.go index aa7d8b85e0f..29ef626dba3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_help_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_help_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_help(t *testing.T) { +func TestTsbuild_commandLine_help(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "help", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_locale_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_locale_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_locale_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_locale_test.go index ee1d259b4f6..a0b00c358e5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_locale_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_locale_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_locale(t *testing.T) { +func TestTsbuild_commandLine_locale(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "locale", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_when_build_not_first_argument_test.go b/internal/execute/tsctests/tests/tsbuild_commandLine_when_build_not_first_argument_test.go similarity index 82% rename from internal/execute/tsctests/tests/Test_tsbuild_commandLine_when_build_not_first_argument_test.go rename to internal/execute/tsctests/tests/tsbuild_commandLine_when_build_not_first_argument_test.go index 04d7f90dc2e..98f536abe50 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_commandLine_when_build_not_first_argument_test.go +++ b/internal/execute/tsctests/tests/tsbuild_commandLine_when_build_not_first_argument_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_commandLine_when_build_not_first_argument(t *testing.T) { +func TestTsbuild_commandLine_when_build_not_first_argument(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "when build not first argument", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_missing_config_file_test.go b/internal/execute/tsctests/tests/tsbuild_configFileErrors_missing_config_file_test.go similarity index 82% rename from internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_missing_config_file_test.go rename to internal/execute/tsctests/tests/tsbuild_configFileErrors_missing_config_file_test.go index 3c97bba5856..ce94ddd8047 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_missing_config_file_test.go +++ b/internal/execute/tsctests/tests/tsbuild_configFileErrors_missing_config_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_configFileErrors_missing_config_file(t *testing.T) { +func TestTsbuild_configFileErrors_missing_config_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "configFileErrors", SubScenario: "missing config file", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go b/internal/execute/tsctests/tests/tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go rename to internal/execute/tsctests/tests/tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go index 8e5efffa823..3d9aee0ba2e 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go +++ b/internal/execute/tsctests/tests/tsbuild_configFileErrors_reports_syntax_errors_in_config_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_configFileErrors_reports_syntax_errors_in_config_file(t *testing.T) { +func TestTsbuild_configFileErrors_reports_syntax_errors_in_config_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "configFileErrors", SubScenario: "reports syntax errors in config file", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go b/internal/execute/tsctests/tests/tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go rename to internal/execute/tsctests/tests/tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go index e2ef65a1764..bc9b670c669 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go +++ b/internal/execute/tsctests/tests/tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_configFileErrors_when_tsconfig_extends_the_missing_file(t *testing.T) { +func TestTsbuild_configFileErrors_when_tsconfig_extends_the_missing_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "configFileErrors", SubScenario: "when tsconfig extends the missing file", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_test.go b/internal/execute/tsctests/tests/tsbuild_declarationEmit_reports_dts_generation_errors_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_declarationEmit_reports_dts_generation_errors_test.go index d4520be0a71..79d6538d3e3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_declarationEmit_reports_dts_generation_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_declarationEmit_reports_dts_generation_errors(t *testing.T) { +func TestTsbuild_declarationEmit_reports_dts_generation_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "reports dts generation errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go index b5587af7c06..c70b4c1ee7b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_declarationEmit_reports_dts_generation_errors_with_incremental(t *testing.T) { +func TestTsbuild_declarationEmit_reports_dts_generation_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "reports dts generation errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go b/internal/execute/tsctests/tests/tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go rename to internal/execute/tsctests/tests/tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go index 113d4d26525..0d76389586d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go +++ b/internal/execute/tsctests/tests/tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references(t *testing.T) { +func TestTsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_but_uses_no_references(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "when declaration file is referenced through triple slash but uses no references", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go b/internal/execute/tsctests/tests/tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go rename to internal/execute/tsctests/tests/tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go index c7d95439217..6989ca745ad 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go +++ b/internal/execute/tsctests/tests/tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash(t *testing.T) { +func TestTsbuild_declarationEmit_when_declaration_file_is_referenced_through_triple_slash(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "when declaration file is referenced through triple slash", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go b/internal/execute/tsctests/tests/tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go rename to internal/execute/tsctests/tests/tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go index e9c37b36514..85a6c2fa28e 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go +++ b/internal/execute/tsctests/tests/tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project(t *testing.T) { +func TestTsbuild_declarationEmit_when_declaration_file_used_inferred_type_from_referenced_project(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "when declaration file used inferred type from referenced project", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go b/internal/execute/tsctests/tests/tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go rename to internal/execute/tsctests/tests/tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go index c7efbb83fdd..b79c0294aa0 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go +++ b/internal/execute/tsctests/tests/tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location(t *testing.T) { +func TestTsbuild_demo_in_bad_ref_branch_reports_the_error_about_files_not_in_rootDir_at_the_import_location(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "demo", SubScenario: "in bad-ref branch reports the error about files not in rootDir at the import location", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go b/internal/execute/tsctests/tests/tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go rename to internal/execute/tsctests/tests/tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go index 56ff40d924a..b6a89722fff 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go +++ b/internal/execute/tsctests/tests/tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build(t *testing.T) { +func TestTsbuild_demo_in_circular_branch_reports_the_error_about_it_by_stopping_build(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "demo", SubScenario: "in circular branch reports the error about it by stopping build", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_is_set_in_the_reference_test.go b/internal/execute/tsctests/tests/tsbuild_demo_in_circular_is_set_in_the_reference_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_is_set_in_the_reference_test.go rename to internal/execute/tsctests/tests/tsbuild_demo_in_circular_is_set_in_the_reference_test.go index 86cee8a1d96..ab5102fea31 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_circular_is_set_in_the_reference_test.go +++ b/internal/execute/tsctests/tests/tsbuild_demo_in_circular_is_set_in_the_reference_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_demo_in_circular_is_set_in_the_reference(t *testing.T) { +func TestTsbuild_demo_in_circular_is_set_in_the_reference(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "demo", SubScenario: "in circular is set in the reference", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go b/internal/execute/tsctests/tests/tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go rename to internal/execute/tsctests/tests/tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go index e2c20421c33..ae8b7bfa965 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go +++ b/internal/execute/tsctests/tests/tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error(t *testing.T) { +func TestTsbuild_demo_in_master_branch_with_everything_setup_correctly_and_reports_no_error(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "demo", SubScenario: "in master branch with everything setup correctly and reports no error", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go b/internal/execute/tsctests/tests/tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go rename to internal/execute/tsctests/tests/tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go index b6705af1abe..237c190317b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go +++ b/internal/execute/tsctests/tests/tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap(t *testing.T) { +func TestTsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_and_declarationMap(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "emitDeclarationOnly", SubScenario: "only dts output in circular import project with emitDeclarationOnly and declarationMap", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go b/internal/execute/tsctests/tests/tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go rename to internal/execute/tsctests/tests/tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go index ad2e4f5fd7e..3dad9c4f8cb 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly(t *testing.T) { +func TestTsbuild_emitDeclarationOnly_only_dts_output_in_circular_import_project_with_emitDeclarationOnly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "emitDeclarationOnly", SubScenario: "only dts output in circular import project with emitDeclarationOnly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go b/internal/execute/tsctests/tests/tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go rename to internal/execute/tsctests/tests/tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go index 1a263e1697f..5d5cac27cbe 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly(t *testing.T) { +func TestTsbuild_emitDeclarationOnly_only_dts_output_in_non_circular_imports_project_with_emitDeclarationOnly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "emitDeclarationOnly", SubScenario: "only dts output in non circular imports project with emitDeclarationOnly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_extends_configDir_template_test.go b/internal/execute/tsctests/tests/tsbuild_extends_configDir_template_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_extends_configDir_template_test.go rename to internal/execute/tsctests/tests/tsbuild_extends_configDir_template_test.go index 2566625454c..b4de0d49896 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_extends_configDir_template_test.go +++ b/internal/execute/tsctests/tests/tsbuild_extends_configDir_template_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_extends_configDir_template(t *testing.T) { +func TestTsbuild_extends_configDir_template(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "extends", SubScenario: "configDir template", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_extends_resolves_the_symlink_path_test.go b/internal/execute/tsctests/tests/tsbuild_extends_resolves_the_symlink_path_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_extends_resolves_the_symlink_path_test.go rename to internal/execute/tsctests/tests/tsbuild_extends_resolves_the_symlink_path_test.go index fc9030245b1..a19a943bf8a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_extends_resolves_the_symlink_path_test.go +++ b/internal/execute/tsctests/tests/tsbuild_extends_resolves_the_symlink_path_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuild_extends_resolves_the_symlink_path(t *testing.T) { +func TestTsbuild_extends_resolves_the_symlink_path(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "extends", SubScenario: "resolves the symlink path", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go b/internal/execute/tsctests/tests/tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go rename to internal/execute/tsctests/tests/tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go index 0fe0a058815..f52a222a706 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go +++ b/internal/execute/tsctests/tests/tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include(t *testing.T) { +func TestTsbuild_extends_when_building_project_uses_reference_and_both_extend_config_with_include(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "extends", SubScenario: "when building project uses reference and both extend config with include", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go b/internal/execute/tsctests/tests/tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go rename to internal/execute/tsctests/tests/tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go index 26bdc33dc1a..cff50036031 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go +++ b/internal/execute/tsctests/tests/tsbuild_extends_when_building_solution_with_projects_extends_config_with_include_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_extends_when_building_solution_with_projects_extends_config_with_include(t *testing.T) { +func TestTsbuild_extends_when_building_solution_with_projects_extends_config_with_include(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "extends", SubScenario: "when building solution with projects extends config with include", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_deleted_file_without_composite_test.go b/internal/execute/tsctests/tests/tsbuild_fileDelete_deleted_file_without_composite_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_fileDelete_deleted_file_without_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_fileDelete_deleted_file_without_composite_test.go index 97f13cb10ae..fcf2d3368a3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_deleted_file_without_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_fileDelete_deleted_file_without_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_fileDelete_deleted_file_without_composite(t *testing.T) { +func TestTsbuild_fileDelete_deleted_file_without_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "fileDelete", SubScenario: "deleted file without composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_detects_deleted_file_test.go b/internal/execute/tsctests/tests/tsbuild_fileDelete_detects_deleted_file_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_fileDelete_detects_deleted_file_test.go rename to internal/execute/tsctests/tests/tsbuild_fileDelete_detects_deleted_file_test.go index d066153e5fd..4b46471b771 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_fileDelete_detects_deleted_file_test.go +++ b/internal/execute/tsctests/tests/tsbuild_fileDelete_detects_deleted_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_fileDelete_detects_deleted_file(t *testing.T) { +func TestTsbuild_fileDelete_detects_deleted_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "fileDelete", SubScenario: "detects deleted file", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go b/internal/execute/tsctests/tests/tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go rename to internal/execute/tsctests/tests/tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go index 3e24d993ac7..3133c8d45ff 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go +++ b/internal/execute/tsctests/tests/tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo(t *testing.T) { +func TestTsbuild_inferredTypeFromMonorepoReference_inferred_type_from_referenced_project_that_references_another_project_in_monorepo(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "inferredTypeFromMonorepoReference", SubScenario: "inferred type from referenced project that references another project in monorepo", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go b/internal/execute/tsctests/tests/tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go rename to internal/execute/tsctests/tests/tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go index c0b62ad9f2f..e168c9fe503 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go +++ b/internal/execute/tsctests/tests/tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module(t *testing.T) { +func TestTsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "inferredTypeFromTransitiveModule", SubScenario: "inferred type from transitive module", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go b/internal/execute/tsctests/tests/tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go rename to internal/execute/tsctests/tests/tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go index 7f232f1b2f2..700d40c158c 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go +++ b/internal/execute/tsctests/tests/tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules(t *testing.T) { +func TestTsbuild_inferredTypeFromTransitiveModule_inferred_type_from_transitive_module_with_isolatedModules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "inferredTypeFromTransitiveModule", SubScenario: "inferred type from transitive module with isolatedModules", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go b/internal/execute/tsctests/tests/tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go rename to internal/execute/tsctests/tests/tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go index 18cc1a35d7b..fdfd12f3be7 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go +++ b/internal/execute/tsctests/tests/tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules(t *testing.T) { +func TestTsbuild_inferredTypeFromTransitiveModule_reports_errors_in_files_affected_by_change_in_signature_with_isolatedModules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "inferredTypeFromTransitiveModule", SubScenario: "reports errors in files affected by change in signature with isolatedModules", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go b/internal/execute/tsctests/tests/tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go rename to internal/execute/tsctests/tests/tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go index e4642963ce8..4469b1fc3a3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly(t *testing.T) { +func TestTsbuild_javascriptProjectEmit_loads_js_based_projects_and_emits_them_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "javascriptProjectEmit", SubScenario: "loads js-based projects and emits them correctly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go b/internal/execute/tsctests/tests/tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go rename to internal/execute/tsctests/tests/tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go index 5ca026aa75d..ed6464900ed 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly(t *testing.T) { +func TestTsbuild_javascriptProjectEmit_loads_js_based_projects_with_non_moved_json_files_and_emits_them_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "javascriptProjectEmit", SubScenario: "loads js-based projects with non-moved json files and emits them correctly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go b/internal/execute/tsctests/tests/tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go rename to internal/execute/tsctests/tests/tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go index 9143a92ef66..d874a2cff20 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go +++ b/internal/execute/tsctests/tests/tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member(t *testing.T) { +func TestTsbuild_lateBoundSymbol_interface_is_merged_and_contains_late_bound_member(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "lateBoundSymbol", SubScenario: "interface is merged and contains late bound member", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_test.go b/internal/execute/tsctests/tests/tsbuild_libraryResolution_with_config_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_test.go rename to internal/execute/tsctests/tests/tsbuild_libraryResolution_with_config_test.go index 176d8620f3c..1be6da33214 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_test.go +++ b/internal/execute/tsctests/tests/tsbuild_libraryResolution_with_config_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_libraryResolution_with_config(t *testing.T) { +func TestTsbuild_libraryResolution_with_config(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "libraryResolution", SubScenario: "with config", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_with_libReplacement_test.go b/internal/execute/tsctests/tests/tsbuild_libraryResolution_with_config_with_libReplacement_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_with_libReplacement_test.go rename to internal/execute/tsctests/tests/tsbuild_libraryResolution_with_config_with_libReplacement_test.go index 6b65a1b226a..b2ad2645d45 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_libraryResolution_with_config_with_libReplacement_test.go +++ b/internal/execute/tsctests/tests/tsbuild_libraryResolution_with_config_with_libReplacement_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_libraryResolution_with_config_with_libReplacement(t *testing.T) { +func TestTsbuild_libraryResolution_with_config_with_libReplacement(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "libraryResolution", SubScenario: "with config with libReplacement", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go b/internal/execute/tsctests/tests/tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go rename to internal/execute/tsctests/tests/tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go index f0292aae262..3294630fd7d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go +++ b/internal/execute/tsctests/tests/tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file(t *testing.T) { +func TestTsbuild_moduleResolution_impliedNodeFormat_differs_between_projects_for_shared_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "impliedNodeFormat differs between projects for shared file", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go b/internal/execute/tsctests/tests/tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go rename to internal/execute/tsctests/tests/tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go index 39d44abaa17..0308b10ed5e 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go +++ b/internal/execute/tsctests/tests/tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project(t *testing.T) { +func TestTsbuild_moduleResolution_resolution_from_d_ts_of_referenced_project(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "resolution from d.ts of referenced project", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go b/internal/execute/tsctests/tests/tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go rename to internal/execute/tsctests/tests/tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go index ec5340620b4..a789e9de63d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly(t *testing.T) { +func TestTsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "resolves specifier in output declaration file from referenced project correctly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go b/internal/execute/tsctests/tests/tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go rename to internal/execute/tsctests/tests/tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go index 1c82fada396..eadf705880e 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go +++ b/internal/execute/tsctests/tests/tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks(t *testing.T) { +func TestTsbuild_moduleResolution_resolves_specifier_in_output_declaration_file_from_referenced_project_correctly_with_preserveSymlinks(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "resolves specifier in output declaration file from referenced project correctly with preserveSymlinks", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go b/internal/execute/tsctests/tests/tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go rename to internal/execute/tsctests/tests/tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go index 67773845d66..d69d658af88 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go +++ b/internal/execute/tsctests/tests/tsbuild_moduleResolution_shared_resolution_should_not_report_error_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuild_moduleResolution_shared_resolution_should_not_report_error(t *testing.T) { +func TestTsbuild_moduleResolution_shared_resolution_should_not_report_error(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "shared resolution should not report error", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go b/internal/execute/tsctests/tests/tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go rename to internal/execute/tsctests/tests/tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go index 5509482ca37..e33c6f9a8c5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go +++ b/internal/execute/tsctests/tests/tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project(t *testing.T) { +func TestTsbuild_moduleResolution_type_reference_resolution_uses_correct_options_for_different_resolution_options_referenced_project(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "type reference resolution uses correct options for different resolution options referenced project", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_when_resolution_is_not_shared_test.go b/internal/execute/tsctests/tests/tsbuild_moduleResolution_when_resolution_is_not_shared_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_when_resolution_is_not_shared_test.go rename to internal/execute/tsctests/tests/tsbuild_moduleResolution_when_resolution_is_not_shared_test.go index d95dd7ea542..2ad86a11fc5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_moduleResolution_when_resolution_is_not_shared_test.go +++ b/internal/execute/tsctests/tests/tsbuild_moduleResolution_when_resolution_is_not_shared_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuild_moduleResolution_when_resolution_is_not_shared(t *testing.T) { +func TestTsbuild_moduleResolution_when_resolution_is_not_shared(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "when resolution is not shared", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go b/internal/execute/tsctests/tests/tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go rename to internal/execute/tsctests/tests/tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go index ffad2656dae..00121b0b0a5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly(t *testing.T) { +func TestTsbuild_moduleSpecifiers_synthesized_module_specifiers_across_projects_resolve_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleSpecifiers", SubScenario: "synthesized module specifiers across projects resolve correctly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go b/internal/execute/tsctests/tests/tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go rename to internal/execute/tsctests/tests/tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go index 54e81e17860..0c681fc8e6d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly(t *testing.T) { +func TestTsbuild_moduleSpecifiers_synthesized_module_specifiers_resolve_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleSpecifiers", SubScenario: "synthesized module specifiers resolve correctly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_test.go b/internal/execute/tsctests/tests/tsbuild_noCheck_dts_errors_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_noCheck_dts_errors_test.go index c8af3a2775f..61af4cab9ee 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noCheck_dts_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noCheck_dts_errors(t *testing.T) { +func TestTsbuild_noCheck_dts_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "dts errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noCheck_dts_errors_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noCheck_dts_errors_with_incremental_test.go index 56ae9dcbada..87d4d95f3ee 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_dts_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noCheck_dts_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noCheck_dts_errors_with_incremental(t *testing.T) { +func TestTsbuild_noCheck_dts_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "dts errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_test.go b/internal/execute/tsctests/tests/tsbuild_noCheck_semantic_errors_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_noCheck_semantic_errors_test.go index 0357f56dc54..3f0f5d4a331 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noCheck_semantic_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noCheck_semantic_errors(t *testing.T) { +func TestTsbuild_noCheck_semantic_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "semantic errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noCheck_semantic_errors_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noCheck_semantic_errors_with_incremental_test.go index 228eb70ff1d..c48f9bf87bc 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_semantic_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noCheck_semantic_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noCheck_semantic_errors_with_incremental(t *testing.T) { +func TestTsbuild_noCheck_semantic_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "semantic errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_test.go b/internal/execute/tsctests/tests/tsbuild_noCheck_syntax_errors_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_noCheck_syntax_errors_test.go index 8b947c5e15c..c7bd57566ea 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noCheck_syntax_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noCheck_syntax_errors(t *testing.T) { +func TestTsbuild_noCheck_syntax_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "syntax errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noCheck_syntax_errors_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noCheck_syntax_errors_with_incremental_test.go index 7b517b3ee82..0ca24e273cb 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noCheck_syntax_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noCheck_syntax_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noCheck_syntax_errors_with_incremental(t *testing.T) { +func TestTsbuild_noCheck_syntax_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "syntax errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_test.go index 6356887257d..6977dbb2ff2 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_dts_errors(t *testing.T) { +func TestTsbuild_noEmitOnError_dts_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "dts errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_with_declaration_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_with_declaration_test.go index 9f9bfc5d987..0032e62c499 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_with_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_dts_errors_with_declaration(t *testing.T) { +func TestTsbuild_noEmitOnError_dts_errors_with_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "dts errors with declaration", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go index 7cd38f82ed4..774c5d04a51 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental(t *testing.T) { +func TestTsbuild_noEmitOnError_dts_errors_with_declaration_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "dts errors with declaration with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_with_incremental_test.go index faecbc931dd..87dc83f85ce 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_dts_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_dts_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_dts_errors_with_incremental(t *testing.T) { +func TestTsbuild_noEmitOnError_dts_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "dts errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_test.go index bfec05b9106..09b2f0b3693 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_semantic_errors(t *testing.T) { +func TestTsbuild_noEmitOnError_semantic_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "semantic errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go index 6e8371e7444..6b82ddd6cce 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_with_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_semantic_errors_with_declaration(t *testing.T) { +func TestTsbuild_noEmitOnError_semantic_errors_with_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "semantic errors with declaration", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go index d891cab7a88..aa465756eda 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental(t *testing.T) { +func TestTsbuild_noEmitOnError_semantic_errors_with_declaration_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "semantic errors with declaration with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go index eb61b7113be..403ba2e944f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_semantic_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_semantic_errors_with_incremental(t *testing.T) { +func TestTsbuild_noEmitOnError_semantic_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "semantic errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_test.go index 8ed7ceb4695..c35d7ec30c4 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_syntax_errors(t *testing.T) { +func TestTsbuild_noEmitOnError_syntax_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "syntax errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go index f93f7ba5947..e5a60c4ee0e 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_with_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_syntax_errors_with_declaration(t *testing.T) { +func TestTsbuild_noEmitOnError_syntax_errors_with_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "syntax errors with declaration", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go index 8e64e8bfdec..2765c6f5438 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental(t *testing.T) { +func TestTsbuild_noEmitOnError_syntax_errors_with_declaration_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "syntax errors with declaration with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go index 836dc9c49ac..f5867f1b27a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmitOnError_syntax_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmitOnError_syntax_errors_with_incremental(t *testing.T) { +func TestTsbuild_noEmitOnError_syntax_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "syntax errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_composite_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_composite_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_changes_composite_test.go index 55874e561d3..7e0fd3a5f14 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_changes_composite(t *testing.T) { +func TestTsbuild_noEmit_changes_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_declaration_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_incremental_declaration_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_declaration_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_changes_incremental_declaration_test.go index e3475fb8ccc..886bffbc33b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_declaration_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_incremental_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_changes_incremental_declaration(t *testing.T) { +func TestTsbuild_noEmit_changes_incremental_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes incremental declaration", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_incremental_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_changes_incremental_test.go index d97d4932406..d7dd3398095 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_changes_incremental(t *testing.T) { +func TestTsbuild_noEmit_changes_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go index c72a28377c9..efd0336ac9a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_with_initial_noEmit_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_changes_with_initial_noEmit_composite(t *testing.T) { +func TestTsbuild_noEmit_changes_with_initial_noEmit_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes with initial noEmit composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go index 39b70a64808..14f8ebbec53 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration(t *testing.T) { +func TestTsbuild_noEmit_changes_with_initial_noEmit_incremental_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes with initial noEmit incremental declaration", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go index 912d6d7185a..287a779402c 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_changes_with_initial_noEmit_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_changes_with_initial_noEmit_incremental(t *testing.T) { +func TestTsbuild_noEmit_changes_with_initial_noEmit_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes with initial noEmit incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_test.go index 627b6d29e4d..8b03b580594 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors(t *testing.T) { +func TestTsbuild_noEmit_dts_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go index cc977c6f258..855ea8de037 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes(t *testing.T) { +func TestTsbuild_noEmit_dts_errors_with_declaration_enable_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with declaration enable changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go index 37d4bf24280..19f7f0edb0d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules(t *testing.T) { +func TestTsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with declaration enable changes with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go index ff5734f0f67..6eb8bc6110c 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental(t *testing.T) { +func TestTsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with declaration enable changes with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go index 64eb845c44d..840670924e9 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files(t *testing.T) { +func TestTsbuild_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with declaration enable changes with multiple files", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go index 4631e4f762d..c01824dd2be 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors_with_incremental_as_modules(t *testing.T) { +func TestTsbuild_noEmit_dts_errors_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_incremental_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_incremental_test.go index 809d6de7bbd..e66ec73dddf 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors_with_incremental(t *testing.T) { +func TestTsbuild_noEmit_dts_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_without_dts_enabled_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_without_dts_enabled_test.go index f54924f1ebf..ebf45cbfb8f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_without_dts_enabled_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors_without_dts_enabled(t *testing.T) { +func TestTsbuild_noEmit_dts_errors_without_dts_enabled(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go index c7d865ac24a..f861b15e924 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules(t *testing.T) { +func TestTsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go index fffde15a453..398909f533a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental(t *testing.T) { +func TestTsbuild_noEmit_dts_errors_without_dts_enabled_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_semantic_errors_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_semantic_errors_test.go index 3c05201bb25..73b80339127 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_semantic_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_semantic_errors(t *testing.T) { +func TestTsbuild_noEmit_semantic_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go index 7c3f85ec04b..3fd85369320 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_semantic_errors_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_semantic_errors_with_incremental_as_modules(t *testing.T) { +func TestTsbuild_noEmit_semantic_errors_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_semantic_errors_with_incremental_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_semantic_errors_with_incremental_test.go index 18e42cf996b..55e7d4fcdbd 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_semantic_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_semantic_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_semantic_errors_with_incremental(t *testing.T) { +func TestTsbuild_noEmit_semantic_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_syntax_errors_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_syntax_errors_test.go index aa580d12af9..09a520dad42 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_syntax_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_syntax_errors(t *testing.T) { +func TestTsbuild_noEmit_syntax_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go index b07e055d3e7..56d87e81b83 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_syntax_errors_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_syntax_errors_with_incremental_as_modules(t *testing.T) { +func TestTsbuild_noEmit_syntax_errors_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_noEmit_syntax_errors_with_incremental_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_noEmit_syntax_errors_with_incremental_test.go index 375afa103e5..467ea79d442 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_noEmit_syntax_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_noEmit_syntax_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_noEmit_syntax_errors_with_incremental(t *testing.T) { +func TestTsbuild_noEmit_syntax_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go index 3c9de6b3737..77553078a32 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite(t *testing.T) { +func TestTsbuild_outputPaths_when_rootDir_is_not_specified_and_is_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "outputPaths", SubScenario: "when rootDir is not specified and is composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_test.go b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_not_specified_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_test.go rename to internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_not_specified_test.go index 7cb1d520369..6e4b69fc305 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_not_specified_test.go +++ b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_not_specified_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_outputPaths_when_rootDir_is_not_specified(t *testing.T) { +func TestTsbuild_outputPaths_when_rootDir_is_not_specified(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "outputPaths", SubScenario: "when rootDir is not specified", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go index 53899d81a6c..b6185fee091 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite(t *testing.T) { +func TestTsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_and_is_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "outputPaths", SubScenario: "when rootDir is specified but not all files belong to rootDir and is composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go rename to internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go index f69fa978ba7..0168f781b1d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go +++ b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir(t *testing.T) { +func TestTsbuild_outputPaths_when_rootDir_is_specified_but_not_all_files_belong_to_rootDir(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "outputPaths", SubScenario: "when rootDir is specified but not all files belong to rootDir", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_test.go b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_specified_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_test.go rename to internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_specified_test.go index 6f8b7f459ea..a2648bb8585 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_outputPaths_when_rootDir_is_specified_test.go +++ b/internal/execute/tsctests/tests/tsbuild_outputPaths_when_rootDir_is_specified_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_outputPaths_when_rootDir_is_specified(t *testing.T) { +func TestTsbuild_outputPaths_when_rootDir_is_specified(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "outputPaths", SubScenario: "when rootDir is specified", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go b/internal/execute/tsctests/tests/tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go rename to internal/execute/tsctests/tests/tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go index 2e2db420a42..1b195e683e3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go +++ b/internal/execute/tsctests/tests/tsbuild_programUpdates_when_root_is_source_from_project_reference_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_programUpdates_when_root_is_source_from_project_reference(t *testing.T) { +func TestTsbuild_programUpdates_when_root_is_source_from_project_reference(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "when root is source from project reference", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go b/internal/execute/tsctests/tests/tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go index ecb058c8034..4ca8623b02c 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite(t *testing.T) { +func TestTsbuild_programUpdates_when_root_is_source_from_project_reference_with_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "programUpdates", SubScenario: "when root is source from project reference with composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go b/internal/execute/tsctests/tests/tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go rename to internal/execute/tsctests/tests/tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go index 58b432b5d7c..1cd6ccee9c3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects(t *testing.T) { +func TestTsbuild_projectReferenceRedirect_uses_correct_project_reference_redirect_when_file_belongs_to_multiple_sub_projects(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferenceRedirect", SubScenario: "uses correct project reference redirect when file belongs to multiple sub-projects", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go rename to internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go index a4d86e0381e..1f6816980b0 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_builds_correctly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectReferenceWithRootDirInParent_builds_correctly(t *testing.T) { +func TestTsbuild_projectReferenceWithRootDirInParent_builds_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferenceWithRootDirInParent", SubScenario: "builds correctly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go rename to internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go index 56e7e45d1ab..909bf24c8d1 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base(t *testing.T) { +func TestTsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_because_no_rootDir_in_the_base(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferenceWithRootDirInParent", SubScenario: "reports error for same tsbuildinfo file because no rootDir in the base", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go rename to internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go index 904ca3ab940..3610dbfb004 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file(t *testing.T) { +func TestTsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferenceWithRootDirInParent", SubScenario: "reports error for same tsbuildinfo file", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go rename to internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go index 7ee8e1e19b6..e52798db19c 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental(t *testing.T) { +func TestTsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferenceWithRootDirInParent", SubScenario: "reports error for same tsbuildinfo file without incremental", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go rename to internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go index 9bcd5175962..72d4bced0a4 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc(t *testing.T) { +func TestTsbuild_projectReferenceWithRootDirInParent_reports_error_for_same_tsbuildinfo_file_without_incremental_with_tsc(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferenceWithRootDirInParent", SubScenario: "reports error for same tsbuildinfo file without incremental with tsc", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go rename to internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go index 96b120ef167..ed22ce10fc3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ(t *testing.T) { +func TestTsbuild_projectReferenceWithRootDirInParent_reports_no_error_when_tsbuildinfo_differ(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferenceWithRootDirInParent", SubScenario: "reports no error when tsbuildinfo differ", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go rename to internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go index c096cfcc4a4..b8dfe4896e3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution(t *testing.T) { +func TestTsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 23 projects in a solution", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go rename to internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go index 1dca1133b19..1e7a8a5f2cd 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3(t *testing.T) { +func TestTsbuild_projectsBuilding_when_there_are_23_projects_in_a_solution_with_builders_3(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 23 projects in a solution with --builders 3", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go rename to internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go index 50868c0bd2c..5e9ef897469 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution(t *testing.T) { +func TestTsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 3 projects in a solution", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go rename to internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go index 1866c932307..a6765bf6287 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1(t *testing.T) { +func TestTsbuild_projectsBuilding_when_there_are_3_projects_in_a_solution_with_builders_1(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 3 projects in a solution with --builders 1", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go rename to internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go index 501a49bf3d0..383796a2382 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution(t *testing.T) { +func TestTsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 5 projects in a solution", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go rename to internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go index 8a3a4fb1d54..88692e19290 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2(t *testing.T) { +func TestTsbuild_projectsBuilding_when_there_are_5_projects_in_a_solution_with_builders_2(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 5 projects in a solution with --builders 2", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go rename to internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go index 15f484a6bd1..cc4a8500d1d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution(t *testing.T) { +func TestTsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 8 projects in a solution", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go rename to internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go index ba6b9486aa6..f4589c2a2fc 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go +++ b/internal/execute/tsctests/tests/tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3(t *testing.T) { +func TestTsbuild_projectsBuilding_when_there_are_8_projects_in_a_solution_with_builders_3(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectsBuilding", SubScenario: "when there are 8 projects in a solution with --builders 3", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go index bb15b48cb6d..d6ee41e8b57 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_files_containing_json_file_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_files_containing_json_file_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_files_containing_json_file_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "files containing json file non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_files_containing_json_file_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_files_containing_json_file_test.go index 7e8f689a607..8ebe0818661 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_files_containing_json_file_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_files_containing_json_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_files_containing_json_file(t *testing.T) { +func TestTsbuild_resolveJsonModule_files_containing_json_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "files containing json file", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go index 6da387821c9..75ab1bc1368 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_importing_json_module_from_project_reference_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_importing_json_module_from_project_reference(t *testing.T) { +func TestTsbuild_resolveJsonModule_importing_json_module_from_project_reference(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "importing json module from project reference", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_and_files_non_composite_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_and_files_non_composite_test.go index 62217a5339c..19c1daeed5c 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_and_files_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_and_files_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_and_files_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include and files non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_and_files_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_and_files_test.go index 3d984c5237a..b6efb34abc2 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_and_files_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_and_files_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_and_files(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_and_files(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include and files", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go index 2dd52ed2d12..fa0688fb572 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include of json along with other include and file name matches ts file non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go index 28ec47dde32..0e61dd449bd 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_of_json_along_with_other_include_and_file_name_matches_ts_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include of json along with other include and file name matches ts file", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go index 3981f4023ba..ce678d81d1d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_of_json_along_with_other_include_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include of json along with other include non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go index 1ffd7203a98..6dff700c4c8 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_of_json_along_with_other_include_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_of_json_along_with_other_include(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_of_json_along_with_other_include(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include of json along with other include", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_non_composite_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_non_composite_test.go index bf0dc842351..bd7eb7b2213 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_only_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_only_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include only non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_test.go index 2c36707b850..d518300956a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_only(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_only(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include only", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go index 3528190b93b..bbb46b0f933 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include only with json not in rootDir non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go index da77019adbb..d3ca0543cd4 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_only_with_json_not_in_rootDir(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include only with json not in rootDir", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go index 43b1e7acbd3..7a0dc295625 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include only with json without rootDir but outside configDirectory non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go index 3eb346110df..5334bfc1c05 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_only_with_json_without_rootDir_but_outside_configDirectory(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include only with json without rootDir but outside configDirectory", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go index fe6552827ba..779db43486d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_without_outDir_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_only_without_outDir_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_only_without_outDir_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include only without outDir non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_without_outDir_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_without_outDir_test.go index cb9df47b821..3f478dd944f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_include_only_without_outDir_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_include_only_without_outDir_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_include_only_without_outDir(t *testing.T) { +func TestTsbuild_resolveJsonModule_include_only_without_outDir(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "include only without outDir", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_sourcemap_non_composite_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_sourcemap_non_composite_test.go index c477b673e60..2ed1a9ba2fd 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_sourcemap_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_sourcemap_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_sourcemap_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "sourcemap non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_sourcemap_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_sourcemap_test.go index 2782151df03..bbeca60fc6c 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_sourcemap_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_sourcemap_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_sourcemap(t *testing.T) { +func TestTsbuild_resolveJsonModule_sourcemap(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "sourcemap", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_non_composite_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_without_outDir_non_composite_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_non_composite_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_without_outDir_non_composite_test.go index 366e9a21d77..6bb11ba1780 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_non_composite_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_without_outDir_non_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_without_outDir_non_composite(t *testing.T) { +func TestTsbuild_resolveJsonModule_without_outDir_non_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "without outDir non-composite", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_test.go b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_without_outDir_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_test.go rename to internal/execute/tsctests/tests/tsbuild_resolveJsonModule_without_outDir_test.go index 74e528b067e..3c7a4734164 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_resolveJsonModule_without_outDir_test.go +++ b/internal/execute/tsctests/tests/tsbuild_resolveJsonModule_without_outDir_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_resolveJsonModule_without_outDir(t *testing.T) { +func TestTsbuild_resolveJsonModule_without_outDir(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "resolveJsonModule", SubScenario: "without outDir", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go b/internal/execute/tsctests/tests/tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go rename to internal/execute/tsctests/tests/tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go index 752fd1fdb9a..154afad879f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go +++ b/internal/execute/tsctests/tests/tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_roots_when_consecutive_and_non_consecutive_are_mixed(t *testing.T) { +func TestTsbuild_roots_when_consecutive_and_non_consecutive_are_mixed(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "roots", SubScenario: "when consecutive and non consecutive are mixed", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_files_are_not_consecutive_test.go b/internal/execute/tsctests/tests/tsbuild_roots_when_files_are_not_consecutive_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_roots_when_files_are_not_consecutive_test.go rename to internal/execute/tsctests/tests/tsbuild_roots_when_files_are_not_consecutive_test.go index 821e951f647..89dc86a4d9b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_files_are_not_consecutive_test.go +++ b/internal/execute/tsctests/tests/tsbuild_roots_when_files_are_not_consecutive_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_roots_when_files_are_not_consecutive(t *testing.T) { +func TestTsbuild_roots_when_files_are_not_consecutive(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "roots", SubScenario: "when files are not consecutive", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_multiple_root_files_are_consecutive_test.go b/internal/execute/tsctests/tests/tsbuild_roots_when_multiple_root_files_are_consecutive_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_roots_when_multiple_root_files_are_consecutive_test.go rename to internal/execute/tsctests/tests/tsbuild_roots_when_multiple_root_files_are_consecutive_test.go index 8557804cfd1..cc3fd710612 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_multiple_root_files_are_consecutive_test.go +++ b/internal/execute/tsctests/tests/tsbuild_roots_when_multiple_root_files_are_consecutive_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_roots_when_multiple_root_files_are_consecutive(t *testing.T) { +func TestTsbuild_roots_when_multiple_root_files_are_consecutive(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "roots", SubScenario: "when multiple root files are consecutive", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go b/internal/execute/tsctests/tests/tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go rename to internal/execute/tsctests/tests/tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go index 555e95456dd..97676573df6 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go +++ b/internal/execute/tsctests/tests/tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first(t *testing.T) { +func TestTsbuild_roots_when_root_file_is_from_referenced_project_and_shared_is_first(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "roots", SubScenario: "when root file is from referenced project and shared is first", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_test.go b/internal/execute/tsctests/tests/tsbuild_roots_when_root_file_is_from_referenced_project_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_test.go rename to internal/execute/tsctests/tests/tsbuild_roots_when_root_file_is_from_referenced_project_test.go index 5f3faad0899..775145529af 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_root_file_is_from_referenced_project_test.go +++ b/internal/execute/tsctests/tests/tsbuild_roots_when_root_file_is_from_referenced_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_roots_when_root_file_is_from_referenced_project(t *testing.T) { +func TestTsbuild_roots_when_root_file_is_from_referenced_project(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "roots", SubScenario: "when root file is from referenced project", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_two_root_files_are_consecutive_test.go b/internal/execute/tsctests/tests/tsbuild_roots_when_two_root_files_are_consecutive_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsbuild_roots_when_two_root_files_are_consecutive_test.go rename to internal/execute/tsctests/tests/tsbuild_roots_when_two_root_files_are_consecutive_test.go index ebba8873ac0..1e2bc422093 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_roots_when_two_root_files_are_consecutive_test.go +++ b/internal/execute/tsctests/tests/tsbuild_roots_when_two_root_files_are_consecutive_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_roots_when_two_root_files_are_consecutive(t *testing.T) { +func TestTsbuild_roots_when_two_root_files_are_consecutive(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "roots", SubScenario: "when two root files are consecutive", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_always_builds_under_with_force_option_test.go b/internal/execute/tsctests/tests/tsbuild_sample_always_builds_under_with_force_option_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_always_builds_under_with_force_option_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_always_builds_under_with_force_option_test.go index cbe8fbe6d3c..546ef3a1fc5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_always_builds_under_with_force_option_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_always_builds_under_with_force_option_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_always_builds_under_with_force_option(t *testing.T) { +func TestTsbuild_sample_always_builds_under_with_force_option(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "always builds under with force option", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go b/internal/execute/tsctests/tests/tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go index 50829146622..73d5fe2cf2b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_building_project_in_not_build_order_doesnt_throw_error(t *testing.T) { +func TestTsbuild_sample_building_project_in_not_build_order_doesnt_throw_error(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "building project in not build order doesnt throw error", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go b/internal/execute/tsctests/tests/tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go index b5ca34c638f..163a840a0fb 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_builds_correctly_when_declarationDir_is_specified_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_builds_correctly_when_declarationDir_is_specified(t *testing.T) { +func TestTsbuild_sample_builds_correctly_when_declarationDir_is_specified(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "builds correctly when declarationDir is specified", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go b/internal/execute/tsctests/tests/tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go index 86fae87c8e9..b3db5254e29 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_builds_correctly_when_outDir_is_specified_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_builds_correctly_when_outDir_is_specified(t *testing.T) { +func TestTsbuild_sample_builds_correctly_when_outDir_is_specified(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "builds correctly when outDir is specified", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go b/internal/execute/tsctests/tests/tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go index 0a0d9ada76e..5039b7c2643 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references(t *testing.T) { +func TestTsbuild_sample_builds_correctly_when_project_is_not_composite_or_doesnt_have_any_references(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "builds correctly when project is not composite or doesnt have any references", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go b/internal/execute/tsctests/tests/tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go index dc4f7bd9407..cbbf478a596 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors(t *testing.T) { +func TestTsbuild_sample_builds_downstream_projects_even_if_upstream_projects_have_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "builds downstream projects even if upstream projects have errors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go b/internal/execute/tsctests/tests/tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go index b3b00eb12a2..ada52b4ed9f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_can_detect_when_and_what_to_rebuild_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_can_detect_when_and_what_to_rebuild(t *testing.T) { +func TestTsbuild_sample_can_detect_when_and_what_to_rebuild(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "can detect when and what to rebuild", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go b/internal/execute/tsctests/tests/tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go index 4e52f50fbab..e646bee830d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error(t *testing.T) { +func TestTsbuild_sample_cleaning_project_in_not_build_order_doesnt_throw_error(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "cleaning project in not build order doesnt throw error", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go b/internal/execute/tsctests/tests/tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go index 111ad436efe..667549437aa 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_does_not_write_any_files_in_a_dry_build_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_does_not_write_any_files_in_a_dry_build(t *testing.T) { +func TestTsbuild_sample_does_not_write_any_files_in_a_dry_build(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "does not write any files in a dry build", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_explainFiles_test.go b/internal/execute/tsctests/tests/tsbuild_sample_explainFiles_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_explainFiles_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_explainFiles_test.go index b5300371f07..436b9bad66f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_explainFiles_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_explainFiles_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_explainFiles(t *testing.T) { +func TestTsbuild_sample_explainFiles(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "explainFiles", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go b/internal/execute/tsctests/tests/tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go index afe5f9f0d7e..5256a9cc57b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build(t *testing.T) { +func TestTsbuild_sample_indicates_that_it_would_skip_builds_during_a_dry_build(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "indicates that it would skip builds during a dry build", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_listEmittedFiles_test.go b/internal/execute/tsctests/tests/tsbuild_sample_listEmittedFiles_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_listEmittedFiles_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_listEmittedFiles_test.go index 3d20339c805..114c44ce59d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_listEmittedFiles_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_listEmittedFiles_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_listEmittedFiles(t *testing.T) { +func TestTsbuild_sample_listEmittedFiles(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "listEmittedFiles", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_listFiles_test.go b/internal/execute/tsctests/tests/tsbuild_sample_listFiles_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_listFiles_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_listFiles_test.go index 73b8a30ecf0..a6d85a0a40b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_listFiles_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_listFiles_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_listFiles(t *testing.T) { +func TestTsbuild_sample_listFiles(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "listFiles", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go b/internal/execute/tsctests/tests/tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go index ee0f8007604..68bae73bcc1 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version(t *testing.T) { +func TestTsbuild_sample_rebuilds_completely_when_version_in_tsbuildinfo_doesnt_match_ts_version(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "rebuilds completely when version in tsbuildinfo doesnt match ts version", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go b/internal/execute/tsctests/tests/tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go index 88e8cbb9b05..265b3e33599 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_rebuilds_from_start_if_force_option_is_set_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_rebuilds_from_start_if_force_option_is_set(t *testing.T) { +func TestTsbuild_sample_rebuilds_from_start_if_force_option_is_set(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "rebuilds from start if force option is set", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go b/internal/execute/tsctests/tests/tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go index 057b0855b58..0e3c149ac8d 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_rebuilds_when_extended_config_file_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_rebuilds_when_extended_config_file_changes(t *testing.T) { +func TestTsbuild_sample_rebuilds_when_extended_config_file_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "rebuilds when extended config file changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_removes_all_files_it_built_test.go b/internal/execute/tsctests/tests/tsbuild_sample_removes_all_files_it_built_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_removes_all_files_it_built_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_removes_all_files_it_built_test.go index 59032c6c552..95b5327f82f 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_removes_all_files_it_built_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_removes_all_files_it_built_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_removes_all_files_it_built(t *testing.T) { +func TestTsbuild_sample_removes_all_files_it_built(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "removes all files it built", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_test.go b/internal/execute/tsctests/tests/tsbuild_sample_reports_error_if_input_file_is_missing_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_reports_error_if_input_file_is_missing_test.go index 1c618b00878..9a7e2b866b3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_reports_error_if_input_file_is_missing_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_reports_error_if_input_file_is_missing(t *testing.T) { +func TestTsbuild_sample_reports_error_if_input_file_is_missing(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "reports error if input file is missing", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go b/internal/execute/tsctests/tests/tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go index 340e99f11df..84657ec0493 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_reports_error_if_input_file_is_missing_with_force_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_reports_error_if_input_file_is_missing_with_force(t *testing.T) { +func TestTsbuild_sample_reports_error_if_input_file_is_missing_with_force(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "reports error if input file is missing with force", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_sample_test.go b/internal/execute/tsctests/tests/tsbuild_sample_sample_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_sample_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_sample_test.go index 07b09a96981..a1239561e9a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_sample_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_sample_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_sample(t *testing.T) { +func TestTsbuild_sample_sample(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "sample", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go b/internal/execute/tsctests/tests/tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go index 5922a4b613e..52baf886b7a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors(t *testing.T) { +func TestTsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go b/internal/execute/tsctests/tests/tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go index e6182d0c44f..5417cc58172 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core(t *testing.T) { +func TestTsbuild_sample_skips_builds_downstream_projects_if_upstream_projects_have_errors_with_stopBuildOnErrors_when_test_does_not_reference_core(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors when test does not reference core", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_tsbuildinfo_has_error_test.go b/internal/execute/tsctests/tests/tsbuild_sample_tsbuildinfo_has_error_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_tsbuildinfo_has_error_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_tsbuildinfo_has_error_test.go index 648ef1c33e4..51b68025bd9 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_tsbuildinfo_has_error_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_tsbuildinfo_has_error_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_tsbuildinfo_has_error(t *testing.T) { +func TestTsbuild_sample_tsbuildinfo_has_error(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "tsbuildinfo has error", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declarationMap_changes_test.go b/internal/execute/tsctests/tests/tsbuild_sample_when_declarationMap_changes_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_when_declarationMap_changes_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_when_declarationMap_changes_test.go index c424556c21b..2659ded998a 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declarationMap_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_when_declarationMap_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_when_declarationMap_changes(t *testing.T) { +func TestTsbuild_sample_when_declarationMap_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "when declarationMap changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declaration_option_changes_test.go b/internal/execute/tsctests/tests/tsbuild_sample_when_declaration_option_changes_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_when_declaration_option_changes_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_when_declaration_option_changes_test.go index 6f38051deb6..c81127fb242 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_declaration_option_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_when_declaration_option_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_when_declaration_option_changes(t *testing.T) { +func TestTsbuild_sample_when_declaration_option_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "when declaration option changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_esModuleInterop_option_changes_test.go b/internal/execute/tsctests/tests/tsbuild_sample_when_esModuleInterop_option_changes_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_when_esModuleInterop_option_changes_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_when_esModuleInterop_option_changes_test.go index b9e4e3aafca..143229d3850 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_esModuleInterop_option_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_when_esModuleInterop_option_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_when_esModuleInterop_option_changes(t *testing.T) { +func TestTsbuild_sample_when_esModuleInterop_option_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "when esModuleInterop option changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go b/internal/execute/tsctests/tests/tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go index 48ed7b4bdfd..700a9787988 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes(t *testing.T) { +func TestTsbuild_sample_when_input_file_text_does_not_change_but_its_modified_time_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "when input file text does not change but its modified time changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go b/internal/execute/tsctests/tests/tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go index 62d55c03a0a..d517ec412a3 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_when_logic_specifies_tsBuildInfoFile_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_when_logic_specifies_tsBuildInfoFile(t *testing.T) { +func TestTsbuild_sample_when_logic_specifies_tsBuildInfoFile(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "when logic specifies tsBuildInfoFile", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_module_option_changes_test.go b/internal/execute/tsctests/tests/tsbuild_sample_when_module_option_changes_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_when_module_option_changes_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_when_module_option_changes_test.go index 4a6972f226b..07e77876a37 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_module_option_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_when_module_option_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_when_module_option_changes(t *testing.T) { +func TestTsbuild_sample_when_module_option_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "when module option changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_target_option_changes_test.go b/internal/execute/tsctests/tests/tsbuild_sample_when_target_option_changes_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsbuild_sample_when_target_option_changes_test.go rename to internal/execute/tsctests/tests/tsbuild_sample_when_target_option_changes_test.go index 04444c0168a..747d63c3ea9 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_sample_when_target_option_changes_test.go +++ b/internal/execute/tsctests/tests/tsbuild_sample_when_target_option_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_sample_when_target_option_changes(t *testing.T) { +func TestTsbuild_sample_when_target_option_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "sample", SubScenario: "when target option changes", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go b/internal/execute/tsctests/tests/tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go rename to internal/execute/tsctests/tests/tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go index acd018c09d0..ae454e5016b 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go +++ b/internal/execute/tsctests/tests/tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided(t *testing.T) { +func TestTsbuild_solution_does_not_have_empty_files_diagnostic_when_files_is_empty_and_references_are_provided(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "solution", SubScenario: "does not have empty files diagnostic when files is empty and references are provided", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go b/internal/execute/tsctests/tests/tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go rename to internal/execute/tsctests/tests/tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go index 6d8842d51ff..a63a6fb1943 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go +++ b/internal/execute/tsctests/tests/tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided(t *testing.T) { +func TestTsbuild_solution_has_empty_files_diagnostic_when_files_is_empty_and_no_references_are_provided(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "solution", SubScenario: "has empty files diagnostic when files is empty and no references are provided", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go b/internal/execute/tsctests/tests/tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go rename to internal/execute/tsctests/tests/tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go index 2fc2773383c..eb616813368 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go +++ b/internal/execute/tsctests/tests/tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything(t *testing.T) { +func TestTsbuild_solution_verify_that_subsequent_builds_after_initial_build_doesnt_build_anything(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "solution", SubScenario: "verify that subsequent builds after initial build doesnt build anything", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_solution_when_solution_is_referenced_indirectly_test.go b/internal/execute/tsctests/tests/tsbuild_solution_when_solution_is_referenced_indirectly_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsbuild_solution_when_solution_is_referenced_indirectly_test.go rename to internal/execute/tsctests/tests/tsbuild_solution_when_solution_is_referenced_indirectly_test.go index a43386c0a2c..0244897da9c 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_solution_when_solution_is_referenced_indirectly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_solution_when_solution_is_referenced_indirectly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_solution_when_solution_is_referenced_indirectly(t *testing.T) { +func TestTsbuild_solution_when_solution_is_referenced_indirectly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "solution", SubScenario: "when solution is referenced indirectly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_builds_correctly_test.go b/internal/execute/tsctests/tests/tsbuild_transitiveReferences_builds_correctly_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_builds_correctly_test.go rename to internal/execute/tsctests/tests/tsbuild_transitiveReferences_builds_correctly_test.go index 329b09af05c..614893dbbb5 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_builds_correctly_test.go +++ b/internal/execute/tsctests/tests/tsbuild_transitiveReferences_builds_correctly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_transitiveReferences_builds_correctly(t *testing.T) { +func TestTsbuild_transitiveReferences_builds_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "transitiveReferences", SubScenario: "builds correctly", diff --git a/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go b/internal/execute/tsctests/tests/tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go rename to internal/execute/tsctests/tests/tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go index 94c16429fb0..d68411eddf8 100644 --- a/internal/execute/tsctests/tests/Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go +++ b/internal/execute/tsctests/tests/tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name(t *testing.T) { +func TestTsbuild_transitiveReferences_reports_error_about_module_not_found_with_node_resolution_with_external_module_name(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "transitiveReferences", SubScenario: "reports error about module not found with node resolution with external module name", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go index cc33599921d..8e7e647e90e 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_at_types_package_installed_later(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_at_types_package_installed_later(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects at-types package installed later", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go index 9a169097d79..7167e3c6ae4 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tscWatch_commandLineWatch_watch_detects_change_in_symlinked_file(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_change_in_symlinked_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects change in symlinked file", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go index 4ca3caed103..101a23a737d 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_file_added_in_multiple_new_subdirectories_simultaneously(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects file added in multiple new subdirectories simultaneously", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go index 09f150b25cf..ca5151db8f4 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_file_added_in_new_nested_subdirectory(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects file added in new nested subdirectory", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go index 24c5cc11c93..8d6fab199c9 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_file_added_to_previously_non_existent_include_path(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects file added to previously non-existent include path", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go index 95d461a23df..8386ee744a1 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_file_deleted_and_new_file_added_simultaneously(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects file deleted and new file added simultaneously", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go index ecc0bed52e2..196ad8dc550 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_file_renamed_and_renamed_back(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects file renamed and renamed back", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go index d28d1a5ae72..8035fb3752a 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_import_path_restructured_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_import_path_restructured(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_import_path_restructured(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects import path restructured", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go index 5b89bca7ce9..17f320e57a8 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_imported_directory_removed_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_imported_directory_removed(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_imported_directory_removed(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects imported directory removed", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go index ff8109b4e29..e916072e82c 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_imported_file_added_in_new_directory(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects imported file added in new directory", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go index a46cfc91afa..8e3c59dcc5b 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_module_going_missing_then_coming_back(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects module going missing then coming back", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go index 803696a939f..41f1ad2a22f 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_nested_subdirectory_removed_and_recreated(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects nested subdirectory removed and recreated", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go index 60ae90488f9..f2b3fffe6a1 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_new_file_in_existing_include_directory(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects new file in existing include directory", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go index dfb2bd72851..fe5936fd036 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_new_file_resolving_failed_import(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects new file resolving failed import", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go index 3182972b4bf..bdec278d56e 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_node_modules_package_added_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_added(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_node_modules_package_added(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects node modules package added", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go index 8add80f4f0c..fe0a42c3332 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_node_modules_package_removed_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_node_modules_package_removed(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_node_modules_package_removed(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects node modules package removed", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go index 059192d7681..cbba3147b5d 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_package_json_types_field_edited(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_package_json_types_field_edited(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects package json types field edited", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go index d2d5600ba94..a338e039274 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_detects_scoped_package_installed_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_detects_scoped_package_installed(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_detects_scoped_package_installed(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch detects scoped package installed", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go index d1c230aabcb..b801e817eae 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_handles_file_rapidly_recreated(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_handles_file_rapidly_recreated(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch handles file rapidly recreated", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go index 21a9cdd2d60..6958392996b 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_handles_tsconfig_deleted_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_handles_tsconfig_deleted(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_handles_tsconfig_deleted(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch handles tsconfig deleted", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go index 424a2fda4a0..e9e145b3713 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_handles_tsconfig_with_extends_base_modified(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch handles tsconfig with extends base modified", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go index 10a1ce4eeac..06b729f0e5a 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_rebuilds_when_file_is_modified(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch rebuilds when file is modified", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go index e6b764cc4fb..408b947353d 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_rebuilds_when_source_file_is_deleted(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch rebuilds when source file is deleted", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go index 96996af596e..e7b0c3d2795 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_include_pattern_adds_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch rebuilds when tsconfig include pattern adds file", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go index c81b49d93f6..a7f50a76b54 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_modified_to_change_strict(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch rebuilds when tsconfig is modified to change strict", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go index ae9eb46037d..be9d8499a5b 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_rebuilds_when_tsconfig_is_touched_but_content_unchanged(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch rebuilds when tsconfig is touched but content unchanged", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go index aa21ee71368..ffdac1515ea 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_skips_build_when_no_files_change_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_skips_build_when_no_files_change(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_skips_build_when_no_files_change(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch skips build when no files change", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go similarity index 85% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go index add71ce8baa..82ce5406032 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_with_no_tsconfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_with_no_tsconfig(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_with_no_tsconfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch with no tsconfig", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go similarity index 85% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go index f600faba4b9..3f5f05382d7 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_with_tsconfig_and_incremental(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_with_tsconfig_and_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch with tsconfig and incremental", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go index 3f4d26187b7..d26a4f05fbd 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted(t *testing.T) { +func TestTscWatch_commandLineWatch_watch_with_tsconfig_files_list_entry_deleted(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLineWatch", SubScenario: "watch with tsconfig files list entry deleted", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go b/internal/execute/tsctests/tests/tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go similarity index 81% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go index 525736b2734..7c2e2055d9c 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLine_Initialized_TSConfig_with_watch_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLine_Initialized_TSConfig_with_watch(t *testing.T) { +func TestTscWatch_commandLine_Initialized_TSConfig_with_watch(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with --watch", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_test.go b/internal/execute/tsctests/tests/tscWatch_commandLine_Parse_watch_interval_option_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLine_Parse_watch_interval_option_test.go index 26d2c71f522..79ab29d5da7 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLine_Parse_watch_interval_option_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLine_Parse_watch_interval_option(t *testing.T) { +func TestTscWatch_commandLine_Parse_watch_interval_option(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Parse watch interval option", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go b/internal/execute/tsctests/tests/tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go similarity index 79% rename from internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go rename to internal/execute/tsctests/tests/tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go index 0f324ac1ea7..78fce77c7cc 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go +++ b/internal/execute/tsctests/tests/tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json(t *testing.T) { +func TestTscWatch_commandLine_Parse_watch_interval_option_without_tsconfig_json(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Parse watch interval option without tsconfig.json", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_test.go b/internal/execute/tsctests/tests/tscWatch_noEmit_dts_errors_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_test.go rename to internal/execute/tsctests/tests/tscWatch_noEmit_dts_errors_test.go index 50eedd0158d..f0f5494c396 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_test.go +++ b/internal/execute/tsctests/tests/tscWatch_noEmit_dts_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_noEmit_dts_errors(t *testing.T) { +func TestTscWatch_noEmit_dts_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_without_dts_enabled_test.go b/internal/execute/tsctests/tests/tscWatch_noEmit_dts_errors_without_dts_enabled_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_without_dts_enabled_test.go rename to internal/execute/tsctests/tests/tscWatch_noEmit_dts_errors_without_dts_enabled_test.go index 764a9fdc348..5b82b6e7f78 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_dts_errors_without_dts_enabled_test.go +++ b/internal/execute/tsctests/tests/tscWatch_noEmit_dts_errors_without_dts_enabled_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_noEmit_dts_errors_without_dts_enabled(t *testing.T) { +func TestTscWatch_noEmit_dts_errors_without_dts_enabled(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_semantic_errors_test.go b/internal/execute/tsctests/tests/tscWatch_noEmit_semantic_errors_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tscWatch_noEmit_semantic_errors_test.go rename to internal/execute/tsctests/tests/tscWatch_noEmit_semantic_errors_test.go index 15498ee47a4..7f8906564ec 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_semantic_errors_test.go +++ b/internal/execute/tsctests/tests/tscWatch_noEmit_semantic_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_noEmit_semantic_errors(t *testing.T) { +func TestTscWatch_noEmit_semantic_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors", diff --git a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_syntax_errors_test.go b/internal/execute/tsctests/tests/tscWatch_noEmit_syntax_errors_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tscWatch_noEmit_syntax_errors_test.go rename to internal/execute/tsctests/tests/tscWatch_noEmit_syntax_errors_test.go index b35050c60a1..1f08adb0242 100644 --- a/internal/execute/tsctests/tests/Test_tscWatch_noEmit_syntax_errors_test.go +++ b/internal/execute/tsctests/tests/tscWatch_noEmit_syntax_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tscWatch_noEmit_syntax_errors(t *testing.T) { +func TestTscWatch_noEmit_syntax_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go index ef5ed64198b..91225bda6e7 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit(t *testing.T) { +func TestTsc_commandLine_Config_with_references_and_empty_file_and_refers_to_config_with_noEmit(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Config with references and empty file and refers to config with noEmit", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go similarity index 83% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go index 25a630e81b2..744070c6a52 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_advanced_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_advanced_options(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_advanced_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with advanced options", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go similarity index 79% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go index e033f307c91..4af4e2f760c 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_boolean_value_compiler_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with boolean value compiler options", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go similarity index 80% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go index 29c6d242bd0..9ac68ba90a8 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_enum_value_compiler_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with enum value compiler options", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_files_options_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_files_options_test.go similarity index 82% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_files_options_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_files_options_test.go index ec4f8b6b790..004c6f06b85 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_files_options_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_files_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_files_options(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_files_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with files options", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_help_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_help_test.go similarity index 82% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_help_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_help_test.go index e2499ab9bf7..6f127ef0f98 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_help_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_help_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_help(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_help(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with --help", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go similarity index 80% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go index eaab9f203f9..ec7fbbef4d7 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with incorrect compiler option", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go similarity index 80% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go index 3f1a25e4316..ce5cdd4f7e7 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_incorrect_compiler_option_value(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with incorrect compiler option value", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go similarity index 80% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go index aa87783926d..603c2e69e6b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_list_compiler_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with list compiler options", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go similarity index 78% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go index 4a27076a948..5f6340e601b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_list_compiler_options_with_enum_value(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with list compiler options with enum value", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go index 582a99aac3e..df93fafc707 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Initialized_TSConfig_with_tsconfig_json_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Initialized_TSConfig_with_tsconfig_json(t *testing.T) { +func TestTsc_commandLine_Initialized_TSConfig_with_tsconfig_json(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Initialized TSConfig with tsconfig.json", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_enum_type_options_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Parse_enum_type_options_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_enum_type_options_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Parse_enum_type_options_test.go index 833d7af806d..22d006a0bf4 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_enum_type_options_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Parse_enum_type_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Parse_enum_type_options(t *testing.T) { +func TestTsc_commandLine_Parse_enum_type_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Parse enum type options", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_lib_option_with_file_name_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Parse_lib_option_with_file_name_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_lib_option_with_file_name_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Parse_lib_option_with_file_name_test.go index d6c453922b2..d1423c60e9b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_lib_option_with_file_name_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Parse_lib_option_with_file_name_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Parse_lib_option_with_file_name(t *testing.T) { +func TestTsc_commandLine_Parse_lib_option_with_file_name(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Parse --lib option with file name", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Parse_p_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Parse_p_test.go index 95a16e19b2f..77e7d0a4c76 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Parse_p_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Parse_p(t *testing.T) { +func TestTsc_commandLine_Parse_p(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Parse -p", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go index 6e71887015d..87944f51f74 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Parse_p_with_path_to_tsconfig_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_file(t *testing.T) { +func TestTsc_commandLine_Parse_p_with_path_to_tsconfig_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Parse -p with path to tsconfig file", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go index 3f5389ee72d..ac3ccb07a0c 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Parse_p_with_path_to_tsconfig_folder_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Parse_p_with_path_to_tsconfig_folder(t *testing.T) { +func TestTsc_commandLine_Parse_p_with_path_to_tsconfig_folder(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Parse -p with path to tsconfig folder", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_Project_is_empty_string_test.go b/internal/execute/tsctests/tests/tsc_commandLine_Project_is_empty_string_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_Project_is_empty_string_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_Project_is_empty_string_test.go index bb3143c4f41..5ee93428808 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_Project_is_empty_string_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_Project_is_empty_string_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_Project_is_empty_string(t *testing.T) { +func TestTsc_commandLine_Project_is_empty_string(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "Project is empty string", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go b/internal/execute/tsctests/tests/tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go similarity index 81% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go index 840d761b7f8..8c953bd2112 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_adds_color_when_FORCE_COLOR_is_set_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_adds_color_when_FORCE_COLOR_is_set(t *testing.T) { +func TestTsc_commandLine_adds_color_when_FORCE_COLOR_is_set(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "adds color when FORCE_COLOR is set", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_bad_locale_test.go b/internal/execute/tsctests/tests/tsc_commandLine_bad_locale_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_bad_locale_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_bad_locale_test.go index 69e3dfb792d..b807a7bc411 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_bad_locale_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_bad_locale_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_bad_locale(t *testing.T) { +func TestTsc_commandLine_bad_locale(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "bad locale", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go b/internal/execute/tsctests/tests/tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go similarity index 78% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go index deb65072335..045eb2f54de 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set(t *testing.T) { +func TestTsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_even_if_FORCE_COLOR_is_set(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "does not add color when NO_COLOR is set even if FORCE_COLOR is set", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go b/internal/execute/tsctests/tests/tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go similarity index 81% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go index 376b0e81e75..c012e17442d 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_does_not_add_color_when_NO_COLOR_is_set(t *testing.T) { +func TestTsc_commandLine_does_not_add_color_when_NO_COLOR_is_set(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "does not add color when NO_COLOR is set", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_help_all_test.go b/internal/execute/tsctests/tests/tsc_commandLine_help_all_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_help_all_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_help_all_test.go index 150e7129da6..1710fd862cd 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_help_all_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_help_all_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_help_all(t *testing.T) { +func TestTsc_commandLine_help_all(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "help all", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_help_test.go b/internal/execute/tsctests/tests/tsc_commandLine_help_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_help_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_help_test.go index d6563b50fa5..3af30be17a0 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_help_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_help_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_help(t *testing.T) { +func TestTsc_commandLine_help(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "help", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_locale_test.go b/internal/execute/tsctests/tests/tsc_commandLine_locale_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_locale_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_locale_test.go index dbb886d6281..57e5de57e7d 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_locale_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_locale_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_locale(t *testing.T) { +func TestTsc_commandLine_locale(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "locale", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go b/internal/execute/tsctests/tests/tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go similarity index 79% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go index 844a3d56365..957deb04207 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped(t *testing.T) { +func TestTsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "show help with ExitStatus.DiagnosticsPresent_OutputsSkipped", diff --git a/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go b/internal/execute/tsctests/tests/tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go similarity index 71% rename from internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go rename to internal/execute/tsctests/tests/tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go index 12c7b71115f..59839ac1e54 100644 --- a/internal/execute/tsctests/tests/Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go +++ b/internal/execute/tsctests/tests/tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width(t *testing.T) { +func TestTsc_commandLine_show_help_with_ExitStatus_DiagnosticsPresent_OutputsSkipped_when_host_cannot_provide_terminal_width(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "commandLine", SubScenario: "show help with ExitStatus.DiagnosticsPresent_OutputsSkipped when host cannot provide terminal width", diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_converting_to_modules_test.go b/internal/execute/tsctests/tests/tsc_composite_converting_to_modules_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsc_composite_converting_to_modules_test.go rename to internal/execute/tsctests/tests/tsc_composite_converting_to_modules_test.go index 9620804c328..ed006a3200a 100644 --- a/internal/execute/tsctests/tests/Test_tsc_composite_converting_to_modules_test.go +++ b/internal/execute/tsctests/tests/tsc_composite_converting_to_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_composite_converting_to_modules(t *testing.T) { +func TestTsc_composite_converting_to_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "composite", SubScenario: "converting to modules", diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go b/internal/execute/tsctests/tests/tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go rename to internal/execute/tsctests/tests/tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go index 28ed654d275..fb547fb93be 100644 --- a/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go +++ b/internal/execute/tsctests/tests/tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element(t *testing.T) { +func TestTsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_error_on_jsx_element(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "composite", SubScenario: "synthetic jsx import of ESM module from CJS module error on jsx element", diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go b/internal/execute/tsctests/tests/tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go rename to internal/execute/tsctests/tests/tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go index 1b9b6ce27b8..96ad729edfe 100644 --- a/internal/execute/tsctests/tests/Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go +++ b/internal/execute/tsctests/tests/tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element(t *testing.T) { +func TestTsc_composite_synthetic_jsx_import_of_ESM_module_from_CJS_module_no_crash_no_jsx_element(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "composite", SubScenario: "synthetic jsx import of ESM module from CJS module no crash no jsx element", diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go b/internal/execute/tsctests/tests/tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go similarity index 85% rename from internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go rename to internal/execute/tsctests/tests/tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go index e699d4b6244..a9d52ebdba1 100644 --- a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go +++ b/internal/execute/tsctests/tests/tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config(t *testing.T) { +func TestTsc_composite_when_setting_composite_false_and_tsbuildinfo_as_null_on_command_line_but_has_tsbuild_info_in_config(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "composite", SubScenario: "when setting composite false and tsbuildinfo as null on command line but has tsbuild info in config", diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go b/internal/execute/tsctests/tests/tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go rename to internal/execute/tsctests/tests/tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go index dbf4d970708..2300da30987 100644 --- a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go +++ b/internal/execute/tsctests/tests/tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config(t *testing.T) { +func TestTsc_composite_when_setting_composite_false_on_command_line_but_has_tsbuild_info_in_config(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "composite", SubScenario: "when setting composite false on command line but has tsbuild info in config", diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_test.go b/internal/execute/tsctests/tests/tsc_composite_when_setting_composite_false_on_command_line_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_test.go rename to internal/execute/tsctests/tests/tsc_composite_when_setting_composite_false_on_command_line_test.go index 5d918a3ee62..105556b14e1 100644 --- a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_false_on_command_line_test.go +++ b/internal/execute/tsctests/tests/tsc_composite_when_setting_composite_false_on_command_line_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_composite_when_setting_composite_false_on_command_line(t *testing.T) { +func TestTsc_composite_when_setting_composite_false_on_command_line(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "composite", SubScenario: "when setting composite false on command line", diff --git a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_null_on_command_line_test.go b/internal/execute/tsctests/tests/tsc_composite_when_setting_composite_null_on_command_line_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_null_on_command_line_test.go rename to internal/execute/tsctests/tests/tsc_composite_when_setting_composite_null_on_command_line_test.go index 606a4766448..5138ad51fbd 100644 --- a/internal/execute/tsctests/tests/Test_tsc_composite_when_setting_composite_null_on_command_line_test.go +++ b/internal/execute/tsctests/tests/tsc_composite_when_setting_composite_null_on_command_line_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_composite_when_setting_composite_null_on_command_line(t *testing.T) { +func TestTsc_composite_when_setting_composite_null_on_command_line(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "composite", SubScenario: "when setting composite null on command line", diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_test.go b/internal/execute/tsctests/tests/tsc_declarationEmit_reports_dts_generation_errors_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_test.go rename to internal/execute/tsctests/tests/tsc_declarationEmit_reports_dts_generation_errors_test.go index 5fcd5c56209..0bd2ee8ca7a 100644 --- a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_declarationEmit_reports_dts_generation_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_declarationEmit_reports_dts_generation_errors(t *testing.T) { +func TestTsc_declarationEmit_reports_dts_generation_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "reports dts generation errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go index 59d0428f4ff..1ce710e9230 100644 --- a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_declarationEmit_reports_dts_generation_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_declarationEmit_reports_dts_generation_errors_with_incremental(t *testing.T) { +func TestTsc_declarationEmit_reports_dts_generation_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "reports dts generation errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go b/internal/execute/tsctests/tests/tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go rename to internal/execute/tsctests/tests/tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go index 9fc72d38374..8977ca6d85c 100644 --- a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go +++ b/internal/execute/tsctests/tests/tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary(t *testing.T) { +func TestTsc_declarationEmit_when_inferred_export_should_reuse_imported_type_alias_across_a_module_boundary(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "when inferred export should reuse imported type alias across a module boundary", diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go b/internal/execute/tsctests/tests/tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go rename to internal/execute/tsctests/tests/tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go index c1689b34641..60537431164 100644 --- a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go +++ b/internal/execute/tsctests/tests/tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink(t *testing.T) { +func TestTsc_declarationEmit_when_pkg_references_sibling_package_through_indirect_symlink(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "when pkg references sibling package through indirect symlink", diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go b/internal/execute/tsctests/tests/tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go rename to internal/execute/tsctests/tests/tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go index 7f1a5f614ec..817ca5127e6 100644 --- a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go +++ b/internal/execute/tsctests/tests/tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package(t *testing.T) { +func TestTsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "when same version is referenced through source and another symlinked package", diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go b/internal/execute/tsctests/tests/tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go rename to internal/execute/tsctests/tests/tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go index 6dc24863571..7724e2de52b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go +++ b/internal/execute/tsctests/tests/tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link(t *testing.T) { +func TestTsc_declarationEmit_when_same_version_is_referenced_through_source_and_another_symlinked_package_with_indirect_link(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "when same version is referenced through source and another symlinked package with indirect link", diff --git a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go b/internal/execute/tsctests/tests/tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go rename to internal/execute/tsctests/tests/tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go index 58542bf4cb2..c4844f82bca 100644 --- a/internal/execute/tsctests/tests/Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go +++ b/internal/execute/tsctests/tests/tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters(t *testing.T) { +func TestTsc_declarationEmit_when_using_Windows_paths_and_uppercase_letters(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "declarationEmit", SubScenario: "when using Windows paths and uppercase letters", diff --git a/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_showConfig_test.go b/internal/execute/tsctests/tests/tsc_extends_configDir_template_showConfig_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_showConfig_test.go rename to internal/execute/tsctests/tests/tsc_extends_configDir_template_showConfig_test.go index 50b50880241..69d9643deda 100644 --- a/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_showConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_extends_configDir_template_showConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_extends_configDir_template_showConfig(t *testing.T) { +func TestTsc_extends_configDir_template_showConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "extends", SubScenario: "configDir template showConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_test.go b/internal/execute/tsctests/tests/tsc_extends_configDir_template_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_test.go rename to internal/execute/tsctests/tests/tsc_extends_configDir_template_test.go index 87ff75cda3a..578ce16ab2e 100644 --- a/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_test.go +++ b/internal/execute/tsctests/tests/tsc_extends_configDir_template_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_extends_configDir_template(t *testing.T) { +func TestTsc_extends_configDir_template(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "extends", SubScenario: "configDir template", diff --git a/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_with_commandline_test.go b/internal/execute/tsctests/tests/tsc_extends_configDir_template_with_commandline_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_with_commandline_test.go rename to internal/execute/tsctests/tests/tsc_extends_configDir_template_with_commandline_test.go index f44e5255096..b1ac23feeab 100644 --- a/internal/execute/tsctests/tests/Test_tsc_extends_configDir_template_with_commandline_test.go +++ b/internal/execute/tsctests/tests/tsc_extends_configDir_template_with_commandline_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_extends_configDir_template_with_commandline(t *testing.T) { +func TestTsc_extends_configDir_template_with_commandline(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "extends", SubScenario: "configDir template with commandline", diff --git a/internal/execute/tsctests/tests/Test_tsc_extends_resolves_the_symlink_path_test.go b/internal/execute/tsctests/tests/tsc_extends_resolves_the_symlink_path_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_extends_resolves_the_symlink_path_test.go rename to internal/execute/tsctests/tests/tsc_extends_resolves_the_symlink_path_test.go index e3aa640fe60..a4b8e7f9e3e 100644 --- a/internal/execute/tsctests/tests/Test_tsc_extends_resolves_the_symlink_path_test.go +++ b/internal/execute/tsctests/tests/tsc_extends_resolves_the_symlink_path_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsc_extends_resolves_the_symlink_path(t *testing.T) { +func TestTsc_extends_resolves_the_symlink_path(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "extends", SubScenario: "resolves the symlink path", diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go similarity index 84% rename from internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go rename to internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go index d38a0bbad21..7338dcfd020 100644 --- a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go +++ b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing(t *testing.T) { +func TestTsc_forceConsistentCasingInFileNames_two_files_exist_on_disk_that_differs_only_in_casing(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "forceConsistentCasingInFileNames", SubScenario: "two files exist on disk that differs only in casing", diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go rename to internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go index 7f5433b2d0b..73301bd7288 100644 --- a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go +++ b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing(t *testing.T) { +func TestTsc_forceConsistentCasingInFileNames_when_file_is_included_from_multiple_places_with_different_casing(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "forceConsistentCasingInFileNames", SubScenario: "when file is included from multiple places with different casing", diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go rename to internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go index 131f13696e2..53829d80c68 100644 --- a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go +++ b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions(t *testing.T) { +func TestTsc_forceConsistentCasingInFileNames_with_relative_and_non_relative_file_resolutions(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "forceConsistentCasingInFileNames", SubScenario: "with relative and non relative file resolutions", diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go similarity index 85% rename from internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go rename to internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go index 458401dbd26..440413048be 100644 --- a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go +++ b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file(t *testing.T) { +func TestTsc_forceConsistentCasingInFileNames_with_triple_slash_ref_from_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "forceConsistentCasingInFileNames", SubScenario: "with triple slash ref from file", diff --git a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go rename to internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go index 234095184bb..184389648b6 100644 --- a/internal/execute/tsctests/tests/Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go +++ b/internal/execute/tsctests/tests/tsc_forceConsistentCasingInFileNames_with_type_ref_from_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_forceConsistentCasingInFileNames_with_type_ref_from_file(t *testing.T) { +func TestTsc_forceConsistentCasingInFileNames_with_type_ref_from_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "forceConsistentCasingInFileNames", SubScenario: "with type ref from file", diff --git a/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_generates_types_file_test.go b/internal/execute/tsctests/tests/tsc_generateTrace_generateTrace_generates_types_file_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_generates_types_file_test.go rename to internal/execute/tsctests/tests/tsc_generateTrace_generateTrace_generates_types_file_test.go index c44e4176c9b..b277e6fe2b3 100644 --- a/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_generates_types_file_test.go +++ b/internal/execute/tsctests/tests/tsc_generateTrace_generateTrace_generates_types_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_generateTrace_generateTrace_generates_types_file(t *testing.T) { +func TestTsc_generateTrace_generateTrace_generates_types_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "generateTrace", SubScenario: "generateTrace generates types file", diff --git a/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go b/internal/execute/tsctests/tests/tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go rename to internal/execute/tsctests/tests/tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go index 3925b099f04..ba6096dd836 100644 --- a/internal/execute/tsctests/tests/Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go +++ b/internal/execute/tsctests/tests/tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_generateTrace_generateTrace_with_multiple_files_and_complex_types(t *testing.T) { +func TestTsc_generateTrace_generateTrace_with_multiple_files_and_complex_types(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "generateTrace", SubScenario: "generateTrace with multiple files and complex types", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_test.go index 6a636153bba..3f42d3eb621 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_mixing_project_and_files(t *testing.T) { +func TestTsc_ignoreConfig_mixing_project_and_files(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "mixing project and files", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go index 88c4e82173c..656a960d6bb 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent(t *testing.T) { +func TestTsc_ignoreConfig_mixing_project_and_files_when_config_file_absent(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "mixing project and files when config file absent", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go similarity index 85% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go index 5691fbcd862..46f2a040099 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig(t *testing.T) { +func TestTsc_ignoreConfig_mixing_project_and_files_when_config_file_absent_with_ignoreConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "mixing project and files when config file absent with --ignoreConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go index 5801435446b..1ed4e2f45fd 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig(t *testing.T) { +func TestTsc_ignoreConfig_mixing_project_and_files_with_ignoreConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "mixing project and files with --ignoreConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_test.go index 5acfe42bc7a..cbc251890e6 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_specifying_files(t *testing.T) { +func TestTsc_ignoreConfig_specifying_files(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "specifying files", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go index 87e4db96903..7f7cccd7ec3 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_when_config_file_absent_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_specifying_files_when_config_file_absent(t *testing.T) { +func TestTsc_ignoreConfig_specifying_files_when_config_file_absent(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "specifying files when config file absent", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go similarity index 85% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go index d71ec6a04d7..e489553245d 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig(t *testing.T) { +func TestTsc_ignoreConfig_specifying_files_when_config_file_absent_with_ignoreConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "specifying files when config file absent with --ignoreConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go index 370fc5274c0..d4e87dab19b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_files_with_ignoreConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_specifying_files_with_ignoreConfig(t *testing.T) { +func TestTsc_ignoreConfig_specifying_files_with_ignoreConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "specifying files with --ignoreConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_test.go index 8563e8d8527..3fcc64dd1bf 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_specifying_project(t *testing.T) { +func TestTsc_ignoreConfig_specifying_project(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "specifying project", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go index d064e93238a..f01fec7def0 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_when_config_file_absent_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_specifying_project_when_config_file_absent(t *testing.T) { +func TestTsc_ignoreConfig_specifying_project_when_config_file_absent(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "specifying project when config file absent", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go similarity index 85% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go index 832802afc3e..f3d0de8a138 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig(t *testing.T) { +func TestTsc_ignoreConfig_specifying_project_when_config_file_absent_with_ignoreConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "specifying project when config file absent with --ignoreConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go index 64d8c5c6fa5..e9530a8688d 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_specifying_project_with_ignoreConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_specifying_project_with_ignoreConfig(t *testing.T) { +func TestTsc_ignoreConfig_specifying_project_with_ignoreConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "specifying project with --ignoreConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_test.go index 41a96858e3e..9b810c7d94b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_without_any_options(t *testing.T) { +func TestTsc_ignoreConfig_without_any_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "without any options", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go similarity index 86% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go index 34caa40dbd2..cc10c9d5a3f 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_when_config_file_absent_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_without_any_options_when_config_file_absent(t *testing.T) { +func TestTsc_ignoreConfig_without_any_options_when_config_file_absent(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "without any options when config file absent", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go similarity index 85% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go index 5765ef798a8..2997804477a 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig(t *testing.T) { +func TestTsc_ignoreConfig_without_any_options_when_config_file_absent_with_ignoreConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "without any options when config file absent with --ignoreConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go b/internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go rename to internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go index 1f627ec2cea..afc17362e37 100644 --- a/internal/execute/tsctests/tests/Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_ignoreConfig_without_any_options_with_ignoreConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_ignoreConfig_without_any_options_with_ignoreConfig(t *testing.T) { +func TestTsc_ignoreConfig_without_any_options_with_ignoreConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "ignoreConfig", SubScenario: "without any options with --ignoreConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go b/internal/execute/tsctests/tests/tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go rename to internal/execute/tsctests/tests/tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go index 88a9685477c..7b15afc8deb 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_Compile_incremental_with_case_insensitive_file_names_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_Compile_incremental_with_case_insensitive_file_names(t *testing.T) { +func TestTsc_incremental_Compile_incremental_with_case_insensitive_file_names(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "Compile incremental with case insensitive file names", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_test.go b/internal/execute/tsctests/tests/tsc_incremental_change_to_modifier_of_class_expression_field_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_test.go rename to internal/execute/tsctests/tests/tsc_incremental_change_to_modifier_of_class_expression_field_test.go index 1cbd64e4b07..455ec7a9b35 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_change_to_modifier_of_class_expression_field_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_change_to_modifier_of_class_expression_field(t *testing.T) { +func TestTsc_incremental_change_to_modifier_of_class_expression_field(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "change to modifier of class expression field", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go b/internal/execute/tsctests/tests/tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go rename to internal/execute/tsctests/tests/tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go index 15dd6dae1fa..740dd2cfc38 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled(t *testing.T) { +func TestTsc_incremental_change_to_modifier_of_class_expression_field_with_declaration_emit_enabled(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "change to modifier of class expression field with declaration emit enabled", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go b/internal/execute/tsctests/tests/tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go rename to internal/execute/tsctests/tests/tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go index 988990187ea..b501ebd3a63 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file(t *testing.T) { +func TestTsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "change to type that gets used as global through export in another file", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go b/internal/execute/tsctests/tests/tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go rename to internal/execute/tsctests/tests/tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go index 82e5b5ac19e..3585dbd809b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import(t *testing.T) { +func TestTsc_incremental_change_to_type_that_gets_used_as_global_through_export_in_another_file_through_indirect_import(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "change to type that gets used as global through export in another file through indirect import", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_in_different_file_test.go b/internal/execute/tsctests/tests/tsc_incremental_const_enums_aliased_in_different_file_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_in_different_file_test.go rename to internal/execute/tsctests/tests/tsc_incremental_const_enums_aliased_in_different_file_test.go index be13986256c..1eeab88f8eb 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_in_different_file_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_const_enums_aliased_in_different_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_const_enums_aliased_in_different_file(t *testing.T) { +func TestTsc_incremental_const_enums_aliased_in_different_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "const enums aliased in different file", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_test.go b/internal/execute/tsctests/tests/tsc_incremental_const_enums_aliased_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_test.go rename to internal/execute/tsctests/tests/tsc_incremental_const_enums_aliased_test.go index a44d0d62cc5..234a07dfbea 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_aliased_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_const_enums_aliased_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_const_enums_aliased(t *testing.T) { +func TestTsc_incremental_const_enums_aliased(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "const enums aliased", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_test.go b/internal/execute/tsctests/tests/tsc_incremental_const_enums_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_test.go rename to internal/execute/tsctests/tests/tsc_incremental_const_enums_test.go index ba3586c5ad5..50efce785c4 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_const_enums_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_const_enums(t *testing.T) { +func TestTsc_incremental_const_enums(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "const enums", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_with_refCycle_test.go b/internal/execute/tsctests/tests/tsc_incremental_const_enums_with_refCycle_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_with_refCycle_test.go rename to internal/execute/tsctests/tests/tsc_incremental_const_enums_with_refCycle_test.go index 47723ff8b18..aeee1bbda1a 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_const_enums_with_refCycle_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_const_enums_with_refCycle_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_const_enums_with_refCycle(t *testing.T) { +func TestTsc_incremental_const_enums_with_refCycle(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "const enums with refCycle", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_generates_typerefs_correctly_test.go b/internal/execute/tsctests/tests/tsc_incremental_generates_typerefs_correctly_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_incremental_generates_typerefs_correctly_test.go rename to internal/execute/tsctests/tests/tsc_incremental_generates_typerefs_correctly_test.go index 104ab328164..768810b4c3b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_generates_typerefs_correctly_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_generates_typerefs_correctly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_generates_typerefs_correctly(t *testing.T) { +func TestTsc_incremental_generates_typerefs_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "generates typerefs correctly", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go b/internal/execute/tsctests/tests/tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go rename to internal/execute/tsctests/tests/tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go index ca667403a5f..965d52e6886 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_internal_symbolname_in_tsbuildInfo_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_internal_symbolname_in_tsbuildInfo(t *testing.T) { +func TestTsc_incremental_internal_symbolname_in_tsbuildInfo(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "internal symbolname in tsbuildInfo", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go b/internal/execute/tsctests/tests/tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go rename to internal/execute/tsctests/tests/tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go index f80292f4159..da52244e131 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_js_file_with_import_in_jsdoc_in_composite_project(t *testing.T) { +func TestTsc_incremental_js_file_with_import_in_jsdoc_in_composite_project(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "js file with import in jsdoc in composite project", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_composite_test.go b/internal/execute/tsctests/tests/tsc_incremental_option_changes_with_composite_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_composite_test.go rename to internal/execute/tsctests/tests/tsc_incremental_option_changes_with_composite_test.go index 99b9044d8a6..cfbec6a4a23 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_composite_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_option_changes_with_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_option_changes_with_composite(t *testing.T) { +func TestTsc_incremental_option_changes_with_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "option changes with composite", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_incremental_option_changes_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_incremental_option_changes_with_incremental_test.go index 093e4ae2ecd..d5858f65753 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_option_changes_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_option_changes_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_option_changes_with_incremental(t *testing.T) { +func TestTsc_incremental_option_changes_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "option changes with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go b/internal/execute/tsctests/tests/tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go rename to internal/execute/tsctests/tests/tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go index cfb1e013796..fd36585d4b8 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash(t *testing.T) { +func TestTsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "react-jsx-emit-mode with no backing types found doesnt crash", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go b/internal/execute/tsctests/tests/tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go rename to internal/execute/tsctests/tests/tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go index 6e7c758d909..bb4f8e7a78a 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict(t *testing.T) { +func TestTsc_incremental_react_jsx_emit_mode_with_no_backing_types_found_doesnt_crash_under_strict(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "react-jsx-emit-mode with no backing types found doesnt crash under --strict", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_composite_project_test.go b/internal/execute/tsctests/tests/tsc_incremental_serializing_composite_project_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_incremental_serializing_composite_project_test.go rename to internal/execute/tsctests/tests/tsc_incremental_serializing_composite_project_test.go index 0f5593707a8..b22da0b5bba 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_composite_project_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_serializing_composite_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_serializing_composite_project(t *testing.T) { +func TestTsc_incremental_serializing_composite_project(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "serializing composite project", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_error_chain_test.go b/internal/execute/tsctests/tests/tsc_incremental_serializing_error_chain_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_incremental_serializing_error_chain_test.go rename to internal/execute/tsctests/tests/tsc_incremental_serializing_error_chain_test.go index 069e26ff459..72d528a6eff 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_serializing_error_chain_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_serializing_error_chain_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_serializing_error_chain(t *testing.T) { +func TestTsc_incremental_serializing_error_chain(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "serializing error chain", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_tsbuildinfo_has_error_test.go b/internal/execute/tsctests/tests/tsc_incremental_tsbuildinfo_has_error_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_incremental_tsbuildinfo_has_error_test.go rename to internal/execute/tsctests/tests/tsc_incremental_tsbuildinfo_has_error_test.go index fcd0d8b35c0..6c8aa4837f5 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_tsbuildinfo_has_error_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_tsbuildinfo_has_error_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_tsbuildinfo_has_error(t *testing.T) { +func TestTsc_incremental_tsbuildinfo_has_error(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "tsbuildinfo has error", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_file_is_deleted_test.go b/internal/execute/tsctests/tests/tsc_incremental_when_file_is_deleted_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsc_incremental_when_file_is_deleted_test.go rename to internal/execute/tsctests/tests/tsc_incremental_when_file_is_deleted_test.go index 3511ab18147..9220dcbd1b4 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_when_file_is_deleted_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_when_file_is_deleted_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_when_file_is_deleted(t *testing.T) { +func TestTsc_incremental_when_file_is_deleted(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "when file is deleted", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go b/internal/execute/tsctests/tests/tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go rename to internal/execute/tsctests/tests/tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go index a348c14b07e..2757cf9583d 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_when_global_file_is_added_the_signatures_are_updated_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_when_global_file_is_added_the_signatures_are_updated(t *testing.T) { +func TestTsc_incremental_when_global_file_is_added_the_signatures_are_updated(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "when global file is added, the signatures are updated", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go b/internal/execute/tsctests/tests/tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go rename to internal/execute/tsctests/tests/tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go index e571c9e1e7a..cb693f81aea 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_when_passing_filename_for_buildinfo_on_commandline_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_when_passing_filename_for_buildinfo_on_commandline(t *testing.T) { +func TestTsc_incremental_when_passing_filename_for_buildinfo_on_commandline(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "when passing filename for buildinfo on commandline", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_from_commandline_test.go b/internal/execute/tsctests/tests/tsc_incremental_when_passing_rootDir_from_commandline_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_from_commandline_test.go rename to internal/execute/tsctests/tests/tsc_incremental_when_passing_rootDir_from_commandline_test.go index ebb629c0f00..b983a9cdf02 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_from_commandline_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_when_passing_rootDir_from_commandline_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_when_passing_rootDir_from_commandline(t *testing.T) { +func TestTsc_incremental_when_passing_rootDir_from_commandline(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "when passing rootDir from commandline", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go b/internal/execute/tsctests/tests/tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go rename to internal/execute/tsctests/tests/tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go index db4174b1c74..0a86a64171f 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_when_passing_rootDir_is_in_the_tsconfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_when_passing_rootDir_is_in_the_tsconfig(t *testing.T) { +func TestTsc_incremental_when_passing_rootDir_is_in_the_tsconfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "when passing rootDir is in the tsconfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go b/internal/execute/tsctests/tests/tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go rename to internal/execute/tsctests/tests/tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go index 19eec0ea67f..61ab11e149c 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_when_there_is_bind_diagnostics_thats_ignored_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_when_there_is_bind_diagnostics_thats_ignored(t *testing.T) { +func TestTsc_incremental_when_there_is_bind_diagnostics_thats_ignored(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "when there is bind diagnostics thats ignored", diff --git a/internal/execute/tsctests/tests/Test_tsc_incremental_with_only_dts_files_test.go b/internal/execute/tsctests/tests/tsc_incremental_with_only_dts_files_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_incremental_with_only_dts_files_test.go rename to internal/execute/tsctests/tests/tsc_incremental_with_only_dts_files_test.go index 2846c2b22e2..5032d6e1659 100644 --- a/internal/execute/tsctests/tests/Test_tsc_incremental_with_only_dts_files_test.go +++ b/internal/execute/tsctests/tests/tsc_incremental_with_only_dts_files_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_incremental_with_only_dts_files(t *testing.T) { +func TestTsc_incremental_with_only_dts_files(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "incremental", SubScenario: "with only dts files", diff --git a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_unknown_lib_test.go b/internal/execute/tsctests/tests/tsc_libraryResolution_unknown_lib_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_libraryResolution_unknown_lib_test.go rename to internal/execute/tsctests/tests/tsc_libraryResolution_unknown_lib_test.go index 5882277b0f2..54f637eaf62 100644 --- a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_unknown_lib_test.go +++ b/internal/execute/tsctests/tests/tsc_libraryResolution_unknown_lib_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_libraryResolution_unknown_lib(t *testing.T) { +func TestTsc_libraryResolution_unknown_lib(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "libraryResolution", SubScenario: "unknown lib", diff --git a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_when_noLib_toggles_test.go b/internal/execute/tsctests/tests/tsc_libraryResolution_when_noLib_toggles_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_libraryResolution_when_noLib_toggles_test.go rename to internal/execute/tsctests/tests/tsc_libraryResolution_when_noLib_toggles_test.go index c1f0c0f39b7..c40e6e14d50 100644 --- a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_when_noLib_toggles_test.go +++ b/internal/execute/tsctests/tests/tsc_libraryResolution_when_noLib_toggles_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_libraryResolution_when_noLib_toggles(t *testing.T) { +func TestTsc_libraryResolution_when_noLib_toggles(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "libraryResolution", SubScenario: "when noLib toggles", diff --git a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_test.go b/internal/execute/tsctests/tests/tsc_libraryResolution_with_config_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_test.go rename to internal/execute/tsctests/tests/tsc_libraryResolution_with_config_test.go index bd1504fc38e..20bd8b46435 100644 --- a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_test.go +++ b/internal/execute/tsctests/tests/tsc_libraryResolution_with_config_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_libraryResolution_with_config(t *testing.T) { +func TestTsc_libraryResolution_with_config(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "libraryResolution", SubScenario: "with config", diff --git a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_with_libReplacement_test.go b/internal/execute/tsctests/tests/tsc_libraryResolution_with_config_with_libReplacement_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_with_libReplacement_test.go rename to internal/execute/tsctests/tests/tsc_libraryResolution_with_config_with_libReplacement_test.go index 45a47fed33e..f6fe0765745 100644 --- a/internal/execute/tsctests/tests/Test_tsc_libraryResolution_with_config_with_libReplacement_test.go +++ b/internal/execute/tsctests/tests/tsc_libraryResolution_with_config_with_libReplacement_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_libraryResolution_with_config_with_libReplacement(t *testing.T) { +func TestTsc_libraryResolution_with_config_with_libReplacement(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "libraryResolution", SubScenario: "with config with libReplacement", diff --git a/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_combined_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_listFilesOnly_combined_with_incremental_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsc_listFilesOnly_combined_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_listFilesOnly_combined_with_incremental_test.go index 8b4b73db23e..1bbd1fcbe50 100644 --- a/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_combined_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_listFilesOnly_combined_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_listFilesOnly_combined_with_incremental(t *testing.T) { +func TestTsc_listFilesOnly_combined_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "listFilesOnly", SubScenario: "combined with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_loose_file_test.go b/internal/execute/tsctests/tests/tsc_listFilesOnly_loose_file_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_listFilesOnly_loose_file_test.go rename to internal/execute/tsctests/tests/tsc_listFilesOnly_loose_file_test.go index 0bd312ce078..46cf6812f36 100644 --- a/internal/execute/tsctests/tests/Test_tsc_listFilesOnly_loose_file_test.go +++ b/internal/execute/tsctests/tests/tsc_listFilesOnly_loose_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_listFilesOnly_loose_file(t *testing.T) { +func TestTsc_listFilesOnly_loose_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "listFilesOnly", SubScenario: "loose file", diff --git a/internal/execute/tsctests/tests/Test_tsc_moduleResolution_alternateResult_test.go b/internal/execute/tsctests/tests/tsc_moduleResolution_alternateResult_test.go similarity index 99% rename from internal/execute/tsctests/tests/Test_tsc_moduleResolution_alternateResult_test.go rename to internal/execute/tsctests/tests/tsc_moduleResolution_alternateResult_test.go index e75cdc020d6..31493af0e3c 100644 --- a/internal/execute/tsctests/tests/Test_tsc_moduleResolution_alternateResult_test.go +++ b/internal/execute/tsctests/tests/tsc_moduleResolution_alternateResult_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_moduleResolution_alternateResult(t *testing.T) { +func TestTsc_moduleResolution_alternateResult(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "alternateResult", diff --git a/internal/execute/tsctests/tests/Test_tsc_moduleResolution_package_json_scope_test.go b/internal/execute/tsctests/tests/tsc_moduleResolution_package_json_scope_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_moduleResolution_package_json_scope_test.go rename to internal/execute/tsctests/tests/tsc_moduleResolution_package_json_scope_test.go index bf2dec6cf5b..6581bee19b8 100644 --- a/internal/execute/tsctests/tests/Test_tsc_moduleResolution_package_json_scope_test.go +++ b/internal/execute/tsctests/tests/tsc_moduleResolution_package_json_scope_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_moduleResolution_package_json_scope(t *testing.T) { +func TestTsc_moduleResolution_package_json_scope(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "package json scope", diff --git a/internal/execute/tsctests/tests/Test_tsc_moduleResolution_pnpm_style_layout_test.go b/internal/execute/tsctests/tests/tsc_moduleResolution_pnpm_style_layout_test.go similarity index 99% rename from internal/execute/tsctests/tests/Test_tsc_moduleResolution_pnpm_style_layout_test.go rename to internal/execute/tsctests/tests/tsc_moduleResolution_pnpm_style_layout_test.go index 08498806534..0a68c52f4db 100644 --- a/internal/execute/tsctests/tests/Test_tsc_moduleResolution_pnpm_style_layout_test.go +++ b/internal/execute/tsctests/tests/tsc_moduleResolution_pnpm_style_layout_test.go @@ -9,7 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) -func Test_tsc_moduleResolution_pnpm_style_layout(t *testing.T) { +func TestTsc_moduleResolution_pnpm_style_layout(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "moduleResolution", SubScenario: "pnpm style layout", diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_test.go b/internal/execute/tsctests/tests/tsc_noCheck_dts_errors_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_test.go rename to internal/execute/tsctests/tests/tsc_noCheck_dts_errors_test.go index b0e2c9051f0..d1db9d5dd9b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_noCheck_dts_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noCheck_dts_errors(t *testing.T) { +func TestTsc_noCheck_dts_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "dts errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noCheck_dts_errors_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noCheck_dts_errors_with_incremental_test.go index 684a71035da..6c8de113e9e 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noCheck_dts_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noCheck_dts_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noCheck_dts_errors_with_incremental(t *testing.T) { +func TestTsc_noCheck_dts_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "dts errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_test.go b/internal/execute/tsctests/tests/tsc_noCheck_semantic_errors_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_test.go rename to internal/execute/tsctests/tests/tsc_noCheck_semantic_errors_test.go index e81ab2e14b9..e0cfcd56640 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_noCheck_semantic_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noCheck_semantic_errors(t *testing.T) { +func TestTsc_noCheck_semantic_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "semantic errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noCheck_semantic_errors_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noCheck_semantic_errors_with_incremental_test.go index 6025ebea795..159904325d0 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noCheck_semantic_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noCheck_semantic_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noCheck_semantic_errors_with_incremental(t *testing.T) { +func TestTsc_noCheck_semantic_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "semantic errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_test.go b/internal/execute/tsctests/tests/tsc_noCheck_syntax_errors_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_test.go rename to internal/execute/tsctests/tests/tsc_noCheck_syntax_errors_test.go index fc71ee6e267..9ed64c37f67 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_noCheck_syntax_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noCheck_syntax_errors(t *testing.T) { +func TestTsc_noCheck_syntax_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "syntax errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noCheck_syntax_errors_with_incremental_test.go similarity index 97% rename from internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noCheck_syntax_errors_with_incremental_test.go index e35b1357d8b..bc3198562a6 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noCheck_syntax_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noCheck_syntax_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noCheck_syntax_errors_with_incremental(t *testing.T) { +func TestTsc_noCheck_syntax_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noCheck", SubScenario: "syntax errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_test.go index 8a60cf00ce0..c3817522a97 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_dts_errors(t *testing.T) { +func TestTsc_noEmitOnError_dts_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "dts errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_with_declaration_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_with_declaration_test.go index 2fb1bd8288d..ccaaaffb62e 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_with_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_dts_errors_with_declaration(t *testing.T) { +func TestTsc_noEmitOnError_dts_errors_with_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "dts errors with declaration", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go index 90db63c2cb3..b88a7f14516 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_with_declaration_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_dts_errors_with_declaration_with_incremental(t *testing.T) { +func TestTsc_noEmitOnError_dts_errors_with_declaration_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "dts errors with declaration with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_with_incremental_test.go index e67a4b77450..3e5d0de8dd5 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_dts_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_dts_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_dts_errors_with_incremental(t *testing.T) { +func TestTsc_noEmitOnError_dts_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "dts errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go index f98406ee666..0ba8cd4ddb3 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError(t *testing.T) { +func TestTsc_noEmitOnError_file_deleted_before_fixing_error_with_noEmitOnError(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "file deleted before fixing error with noEmitOnError", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_test.go index 14413e63305..987b326c6da 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_semantic_errors(t *testing.T) { +func TestTsc_noEmitOnError_semantic_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "semantic errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_with_declaration_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_with_declaration_test.go index a3b73ad4443..f8c75965419 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_with_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_semantic_errors_with_declaration(t *testing.T) { +func TestTsc_noEmitOnError_semantic_errors_with_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "semantic errors with declaration", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go index 92cb4adf378..abf8268302d 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_semantic_errors_with_declaration_with_incremental(t *testing.T) { +func TestTsc_noEmitOnError_semantic_errors_with_declaration_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "semantic errors with declaration with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_with_incremental_test.go index 8c288ed9387..965a15a9883 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_semantic_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_semantic_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_semantic_errors_with_incremental(t *testing.T) { +func TestTsc_noEmitOnError_semantic_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "semantic errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_test.go index 938a82e722d..d89d38ad34c 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_syntax_errors(t *testing.T) { +func TestTsc_noEmitOnError_syntax_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "syntax errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_with_declaration_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_with_declaration_test.go index a40d9717871..009fa346d99 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_with_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_syntax_errors_with_declaration(t *testing.T) { +func TestTsc_noEmitOnError_syntax_errors_with_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "syntax errors with declaration", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go index 33ce843f828..e0ead6a4954 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_syntax_errors_with_declaration_with_incremental(t *testing.T) { +func TestTsc_noEmitOnError_syntax_errors_with_declaration_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "syntax errors with declaration with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_with_incremental_test.go index 18ee106b8d1..44331bb05df 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_syntax_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_syntax_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_syntax_errors_with_incremental(t *testing.T) { +func TestTsc_noEmitOnError_syntax_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "syntax errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_when_declarationMap_changes_test.go b/internal/execute/tsctests/tests/tsc_noEmitOnError_when_declarationMap_changes_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_noEmitOnError_when_declarationMap_changes_test.go rename to internal/execute/tsctests/tests/tsc_noEmitOnError_when_declarationMap_changes_test.go index 2fbc9e40034..435111b747a 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmitOnError_when_declarationMap_changes_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmitOnError_when_declarationMap_changes_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmitOnError_when_declarationMap_changes(t *testing.T) { +func TestTsc_noEmitOnError_when_declarationMap_changes(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmitOnError", SubScenario: "when declarationMap changes", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_composite_test.go b/internal/execute/tsctests/tests/tsc_noEmit_changes_composite_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_changes_composite_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_changes_composite_test.go index 38b97ec0a75..da3edb38287 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_composite_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_changes_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_changes_composite(t *testing.T) { +func TestTsc_noEmit_changes_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes composite", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_declaration_test.go b/internal/execute/tsctests/tests/tsc_noEmit_changes_incremental_declaration_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_declaration_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_changes_incremental_declaration_test.go index 1dc60a05f65..e0e38a2445e 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_declaration_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_changes_incremental_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_changes_incremental_declaration(t *testing.T) { +func TestTsc_noEmit_changes_incremental_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes incremental declaration", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmit_changes_incremental_test.go similarity index 98% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_changes_incremental_test.go index 7979f243e79..64537d288e8 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_changes_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_changes_incremental(t *testing.T) { +func TestTsc_noEmit_changes_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_composite_test.go b/internal/execute/tsctests/tests/tsc_noEmit_changes_with_initial_noEmit_composite_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_composite_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_changes_with_initial_noEmit_composite_test.go index 714b8c13a20..acaaa2bfda8 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_composite_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_changes_with_initial_noEmit_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_changes_with_initial_noEmit_composite(t *testing.T) { +func TestTsc_noEmit_changes_with_initial_noEmit_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes with initial noEmit composite", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go b/internal/execute/tsctests/tests/tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go index f4e6c35aa9a..deb8fe190c8 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_changes_with_initial_noEmit_incremental_declaration_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_changes_with_initial_noEmit_incremental_declaration(t *testing.T) { +func TestTsc_noEmit_changes_with_initial_noEmit_incremental_declaration(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes with initial noEmit incremental declaration", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmit_changes_with_initial_noEmit_incremental_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_changes_with_initial_noEmit_incremental_test.go index a4017d8b8e0..0c233f00027 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_changes_with_initial_noEmit_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_changes_with_initial_noEmit_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_changes_with_initial_noEmit_incremental(t *testing.T) { +func TestTsc_noEmit_changes_with_initial_noEmit_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "changes with initial noEmit incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_test.go b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_dts_errors_test.go index e6c94662669..9be91bd6f30 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_dts_errors(t *testing.T) { +func TestTsc_noEmit_dts_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go index 0a11c1d60eb..ee5521392f4 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files(t *testing.T) { +func TestTsc_noEmit_dts_errors_with_declaration_enable_changes_with_multiple_files(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with declaration enable changes with multiple files", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_with_incremental_as_modules_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_dts_errors_with_incremental_as_modules_test.go index d20a87cb87a..c7849a50d1b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_dts_errors_with_incremental_as_modules(t *testing.T) { +func TestTsc_noEmit_dts_errors_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_with_incremental_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_dts_errors_with_incremental_test.go index 6146dfe6652..8990a8d2fbb 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_dts_errors_with_incremental(t *testing.T) { +func TestTsc_noEmit_dts_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_test.go b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_without_dts_enabled_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_dts_errors_without_dts_enabled_test.go index ec36a2172a7..10f525f8891 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_without_dts_enabled_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_dts_errors_without_dts_enabled(t *testing.T) { +func TestTsc_noEmit_dts_errors_without_dts_enabled(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go index f1845d6ff2d..577291295ee 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules(t *testing.T) { +func TestTsc_noEmit_dts_errors_without_dts_enabled_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go index aca10d29a3e..8853ccda720 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_dts_errors_without_dts_enabled_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_dts_errors_without_dts_enabled_with_incremental(t *testing.T) { +func TestTsc_noEmit_dts_errors_without_dts_enabled_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "dts errors without dts enabled with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_test.go b/internal/execute/tsctests/tests/tsc_noEmit_semantic_errors_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_semantic_errors_test.go index bc62bd5619c..ca4cfc6e503 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_semantic_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_semantic_errors(t *testing.T) { +func TestTsc_noEmit_semantic_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go index 29439023236..ba55266b290 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_semantic_errors_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_semantic_errors_with_incremental_as_modules(t *testing.T) { +func TestTsc_noEmit_semantic_errors_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmit_semantic_errors_with_incremental_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_semantic_errors_with_incremental_test.go index 40c7aad94e4..f13363a1316 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_semantic_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_semantic_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_semantic_errors_with_incremental(t *testing.T) { +func TestTsc_noEmit_semantic_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "semantic errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_test.go b/internal/execute/tsctests/tests/tsc_noEmit_syntax_errors_test.go similarity index 96% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_syntax_errors_test.go index 53c5bfe2dcb..fc6e7122081 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_syntax_errors_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_syntax_errors(t *testing.T) { +func TestTsc_noEmit_syntax_errors(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go b/internal/execute/tsctests/tests/tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go index 704052cc426..b1ef4f422d4 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_syntax_errors_with_incremental_as_modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_syntax_errors_with_incremental_as_modules(t *testing.T) { +func TestTsc_noEmit_syntax_errors_with_incremental_as_modules(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors with incremental as modules", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_test.go b/internal/execute/tsctests/tests/tsc_noEmit_syntax_errors_with_incremental_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_syntax_errors_with_incremental_test.go index 2556dcfa12e..5909a165969 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_syntax_errors_with_incremental_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_syntax_errors_with_incremental_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_syntax_errors_with_incremental(t *testing.T) { +func TestTsc_noEmit_syntax_errors_with_incremental(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "syntax errors with incremental", diff --git a/internal/execute/tsctests/tests/Test_tsc_noEmit_when_project_has_strict_true_test.go b/internal/execute/tsctests/tests/tsc_noEmit_when_project_has_strict_true_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_noEmit_when_project_has_strict_true_test.go rename to internal/execute/tsctests/tests/tsc_noEmit_when_project_has_strict_true_test.go index e2a7d26d8d6..6c2e97db7f5 100644 --- a/internal/execute/tsctests/tests/Test_tsc_noEmit_when_project_has_strict_true_test.go +++ b/internal/execute/tsctests/tests/tsc_noEmit_when_project_has_strict_true_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_noEmit_when_project_has_strict_true(t *testing.T) { +func TestTsc_noEmit_when_project_has_strict_true(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "noEmit", SubScenario: "when project has strict true", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go similarity index 95% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go index 87f069c6011..ca9de44b153 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_default_import_interop_uses_referenced_project_settings_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_default_import_interop_uses_referenced_project_settings(t *testing.T) { +func TestTsc_projectReferences_default_import_interop_uses_referenced_project_settings(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "default import interop uses referenced project settings", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_setup_was_created_correctly_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_default_setup_was_created_correctly_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_default_setup_was_created_correctly_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_default_setup_was_created_correctly_test.go index e617b0236b1..c9f177c8684 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_default_setup_was_created_correctly_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_default_setup_was_created_correctly_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_default_setup_was_created_correctly(t *testing.T) { +func TestTsc_projectReferences_default_setup_was_created_correctly(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "default setup was created correctly", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go index 65be5c99a87..1b46340afac 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project(t *testing.T) { +func TestTsc_projectReferences_does_not_error_when_the_referenced_project_doesnt_have_composite_if_its_a_container_project(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "does not error when the referenced project doesnt have composite if its a container project", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go index b18efa98b1f..db1dc705676 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths(t *testing.T) { +func TestTsc_projectReferences_doesnt_infer_the_rootDir_from_source_paths(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "doesnt infer the rootDir from source paths", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go index 55b3f630d61..311c1db2614 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_errors_when_a_file_is_outside_the_rootdir(t *testing.T) { +func TestTsc_projectReferences_errors_when_a_file_is_outside_the_rootdir(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "errors when a file is outside the rootdir", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_declaration_false_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_declaration_false_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_declaration_false_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_errors_when_declaration_false_test.go index e1a37e5d0ec..97d986f682f 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_declaration_false_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_declaration_false_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_errors_when_declaration_false(t *testing.T) { +func TestTsc_projectReferences_errors_when_declaration_false(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "errors when declaration = false", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go index 8c6547ae57a..9b87982800c 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_errors_when_the_file_list_is_not_exhaustive(t *testing.T) { +func TestTsc_projectReferences_errors_when_the_file_list_is_not_exhaustive(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "errors when the file list is not exhaustive", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go index 525df99a598..7e4dd479b12 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_exist(t *testing.T) { +func TestTsc_projectReferences_errors_when_the_referenced_project_doesnt_exist(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "errors when the referenced project doesnt exist", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go index 9768d994b12..0c9028db574 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite(t *testing.T) { +func TestTsc_projectReferences_errors_when_the_referenced_project_doesnt_have_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "errors when the referenced project doesnt have composite", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go index 6240cfb10f9..e916810a09d 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax(t *testing.T) { +func TestTsc_projectReferences_importing_const_enum_from_referenced_project_with_preserveConstEnums_and_verbatimModuleSyntax(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "importing const enum from referenced project with preserveConstEnums and verbatimModuleSyntax", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go index 252f848ef4b..8147181a6bc 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing(t *testing.T) { +func TestTsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "issues a nice error when the input file is missing", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go similarity index 88% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go index 55af768ac2c..cfa6f75d853 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative(t *testing.T) { +func TestTsc_projectReferences_issues_a_nice_error_when_the_input_file_is_missing_when_module_reference_is_not_relative(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "issues a nice error when the input file is missing when module reference is not relative", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_redirects_to_the_output_dts_file_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_redirects_to_the_output_dts_file_test.go similarity index 92% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_redirects_to_the_output_dts_file_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_redirects_to_the_output_dts_file_test.go index 601638fa547..f8e0d94603c 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_redirects_to_the_output_dts_file_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_redirects_to_the_output_dts_file_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_redirects_to_the_output_dts_file(t *testing.T) { +func TestTsc_projectReferences_redirects_to_the_output_dts_file(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "redirects to the output dts file", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go index f590b997397..6f7f0db1495 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports(t *testing.T) { +func TestTsc_projectReferences_referenced_project_with_esnext_module_disallows_synthetic_default_imports(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "referenced project with esnext module disallows synthetic default imports", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go index bd29d1d31b5..f0913415d97 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums(t *testing.T) { +func TestTsc_projectReferences_referencing_ambient_const_enum_from_referenced_project_with_preserveConstEnums(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "referencing ambient const enum from referenced project with preserveConstEnums", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go index e81cce81432..b6db1ce5f82 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1(t *testing.T) { +func TestTsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences1(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "rewriteRelativeImportExtensionsProjectReferences1", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go index 931dce55a83..7c375e313a7 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2(t *testing.T) { +func TestTsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences2(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "rewriteRelativeImportExtensionsProjectReferences2", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go similarity index 93% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go index f2bc13c312e..61cb5e806fa 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3(t *testing.T) { +func TestTsc_projectReferences_rewriteRelativeImportExtensionsProjectReferences3(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "rewriteRelativeImportExtensionsProjectReferences3", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_contains_invalid_project_reference_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_when_project_contains_invalid_project_reference_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_contains_invalid_project_reference_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_when_project_contains_invalid_project_reference_test.go index 3822e2d560b..211e9772ebd 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_contains_invalid_project_reference_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_when_project_contains_invalid_project_reference_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_when_project_contains_invalid_project_reference(t *testing.T) { +func TestTsc_projectReferences_when_project_contains_invalid_project_reference(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "when project contains invalid project reference", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_reference_is_not_built_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_when_project_reference_is_not_built_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_reference_is_not_built_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_when_project_reference_is_not_built_test.go index 69636fdf0f9..24bf757f84c 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_reference_is_not_built_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_when_project_reference_is_not_built_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_when_project_reference_is_not_built(t *testing.T) { +func TestTsc_projectReferences_when_project_reference_is_not_built(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "when project reference is not built", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go index db3c243422c..0f71a8c5558 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_when_project_references_composite_project_with_noEmit_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_when_project_references_composite_project_with_noEmit(t *testing.T) { +func TestTsc_projectReferences_when_project_references_composite_project_with_noEmit(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "when project references composite project with noEmit", diff --git a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_test.go b/internal/execute/tsctests/tests/tsc_projectReferences_when_project_references_composite_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_test.go rename to internal/execute/tsctests/tests/tsc_projectReferences_when_project_references_composite_test.go index a3a0f2344b6..607090b6a96 100644 --- a/internal/execute/tsctests/tests/Test_tsc_projectReferences_when_project_references_composite_test.go +++ b/internal/execute/tsctests/tests/tsc_projectReferences_when_project_references_composite_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_projectReferences_when_project_references_composite(t *testing.T) { +func TestTsc_projectReferences_when_project_references_composite(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "projectReferences", SubScenario: "when project references composite", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Default_initialized_TSConfig_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Default_initialized_TSConfig_test.go similarity index 82% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Default_initialized_TSConfig_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Default_initialized_TSConfig_test.go index 4a5a6086f1f..5454e923a74 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Default_initialized_TSConfig_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Default_initialized_TSConfig_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Default_initialized_TSConfig(t *testing.T) { +func TestTsc_showConfig_Default_initialized_TSConfig(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Default initialized TSConfig", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_advanced_options_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_advanced_options_test.go similarity index 84% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_advanced_options_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_advanced_options_test.go index f944e679319..128b865d27f 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_advanced_options_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_advanced_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_advanced_options(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_advanced_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with advanced options", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go similarity index 80% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go index 908f6298c6f..77daf37e4a4 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_boolean_value_compiler_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with boolean value compiler options", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go index 778ac05096a..928c9fd8fcb 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_compileOnSave_and_more(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_compileOnSave_and_more(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with compileOnSave and more", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go similarity index 81% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go index c44afd91079..a1370cbb1e1 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_enum_value_compiler_options(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_enum_value_compiler_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with enum value compiler options", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go index 42f6eb706e2..dcb3b0f735f 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_exclude_and_outDir_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_exclude_and_outDir(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_exclude_and_outDir(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with exclude and outDir", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_exclude_test.go similarity index 91% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_exclude_test.go index 3e03e7f4d7f..fabeed3b0f0 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_exclude_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_exclude_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_exclude(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_exclude(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with exclude", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_and_include_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_files_and_include_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_and_include_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_files_and_include_test.go index d3b2861aa3b..1d9e80fb822 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_and_include_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_files_and_include_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_files_and_include(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_files_and_include(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with files and include", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_options_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_files_options_test.go similarity index 83% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_options_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_files_options_test.go index 5df836f8a4c..d153fdc214a 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_files_options_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_files_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_files_options(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_files_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with files options", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go index 14d8f64870c..cdc2f1c1454 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_include_filtering_files_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_include_filtering_files(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_include_filtering_files(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with include filtering files", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go similarity index 81% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go index 715e905b2cc..04325af3aa8 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_incorrect_compiler_option(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with incorrect compiler option", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go similarity index 81% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go index de90e7cf4b2..b9d6115d921 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_incorrect_compiler_option_value(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with incorrect compiler option value", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go similarity index 82% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go index 18b67cb28bc..48447f71ff8 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_list_compiler_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_list_compiler_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with list compiler options", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go similarity index 80% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go index f4b15878002..b989712ca8d 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_list_compiler_options_with_enum_value(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with list compiler options with enum value", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go similarity index 94% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go index df8718bfe85..2babdd8989b 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_paths_and_more_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_paths_and_more(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_paths_and_more(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with paths and more", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_references_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_references_test.go similarity index 90% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_references_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_references_test.go index d9f8d2dfbdf..b51bdbdcca9 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_references_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_references_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_references(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_references(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with references", diff --git a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go similarity index 87% rename from internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go rename to internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go index 2f0b8d59298..7b588c0f0cb 100644 --- a/internal/execute/tsctests/tests/Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go +++ b/internal/execute/tsctests/tests/tsc_showConfig_Show_TSConfig_with_transitively_implied_options_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_showConfig_Show_TSConfig_with_transitively_implied_options(t *testing.T) { +func TestTsc_showConfig_Show_TSConfig_with_transitively_implied_options(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "showConfig", SubScenario: "Show TSConfig with transitively implied options", diff --git a/internal/execute/tsctests/tests/Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go b/internal/execute/tsctests/tests/tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go similarity index 89% rename from internal/execute/tsctests/tests/Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go rename to internal/execute/tsctests/tests/tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go index 095fb6e1c3e..3797dd74a5f 100644 --- a/internal/execute/tsctests/tests/Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go +++ b/internal/execute/tsctests/tests/tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition_test.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/execute/tsctests" ) -func Test_tsc_typeAcquisition_parse_tsconfig_with_typeAcquisition(t *testing.T) { +func TestTsc_typeAcquisition_parse_tsconfig_with_typeAcquisition(t *testing.T) { test := &tsctests.TestSpec{ Scenario: "typeAcquisition", SubScenario: "parse tsconfig with typeAcquisition", From f4823d81b532dc416db76f52e011d0a8f2fbb61c Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 20 May 2026 09:57:58 -0700 Subject: [PATCH 3/3] Add baseline track test per request --- internal/execute/tsctests/tests/testmain_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 internal/execute/tsctests/tests/testmain_test.go diff --git a/internal/execute/tsctests/tests/testmain_test.go b/internal/execute/tsctests/tests/testmain_test.go new file mode 100644 index 00000000000..126a6539d7c --- /dev/null +++ b/internal/execute/tsctests/tests/testmain_test.go @@ -0,0 +1,14 @@ +package tests + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/testutil/baseline" +) + +func TestMain(m *testing.M) { + core.ApplyDebugStackLimit() + defer baseline.Track()() + m.Run() +}