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

This commit is contained in:
Kirill Fomichev 2021-06-30 21:00:37 +03:00 committed by GitHub
parent 7314c66c9f
commit 94f08cd166
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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/"
},