瀏覽代碼

cli: Remove .spec from ts files (#441)

Kirill Fomichev 4 年之前
父節點
當前提交
94f08cd166
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 4 0
      CHANGELOG.md
  2. 2 2
      cli/src/main.rs

+ 4 - 0
CHANGELOG.md

@@ -11,6 +11,10 @@ incremented for features.
 
 ## [Unreleased]
 
+### Breaking Changes
+
+* cli: Remove `.spec` suffix on TypeScript tests files ([#441](https://github.com/project-serum/anchor/pull/441)).
+
 ## [0.10.0] - 2021-06-27
 
 ### Features

+ 2 - 2
cli/src/main.rs

@@ -313,7 +313,7 @@ fn init(cfg_override: &ConfigOverride, name: String, typescript: bool) -> Result
         let mut deploy = File::create("migrations/deploy.ts")?;
         deploy.write_all(template::ts_deploy_script().as_bytes())?;
 
-        let mut mocha = File::create(&format!("tests/{}.spec.ts", name))?;
+        let mut mocha = File::create(&format!("tests/{}.ts", name))?;
         mocha.write_all(template::ts_mocha(&name).as_bytes())?;
     } else {
         let mut mocha = File::create(&format!("tests/{}.js", name))?;
@@ -1019,7 +1019,7 @@ fn test(
                 if let Some(ref file) = file {
                     file
                 } else if ts_config_exist {
-                    "tests/**/*.spec.ts"
+                    "tests/**/*.ts"
                 } else {
                     "tests/"
                 },