diff --git a/cli/src/template.rs b/cli/src/template.rs index f03da20f0..a9070d64d 100644 --- a/cli/src/template.rs +++ b/cli/src/template.rs @@ -141,7 +141,7 @@ module.exports = async function (provider) { anchor.setProvider(provider); // Add your deploy script here. -} +}; "# } @@ -157,7 +157,7 @@ module.exports = async function (provider) { anchor.setProvider(provider); // Add your deploy script here. -} +}; "# } @@ -191,14 +191,13 @@ pub struct Initialize {{}} pub fn mocha(name: &str) -> String { format!( - r#"const anchor = require('@project-serum/anchor'); - -describe('{}', () => {{ + r#"const anchor = require("@project-serum/anchor"); +describe("{}", () => {{ // Configure the client to use the local cluster. anchor.setProvider(anchor.Provider.env()); - it('Is initialized!', async () => {{ + it("Is initialized!", async () => {{ // Add your test here. const program = anchor.workspace.{}; const tx = await program.rpc.initialize(); @@ -248,18 +247,17 @@ pub fn ts_package_json() -> String { pub fn ts_mocha(name: &str) -> String { format!( - r#"import * as anchor from '@project-serum/anchor'; -import {{ Program }} from '@project-serum/anchor'; -import {{ {} }} from '../target/types/{}'; - -describe('{}', () => {{ + r#"import * as anchor from "@project-serum/anchor"; +import {{ Program }} from "@project-serum/anchor"; +import {{ {} }} from "../target/types/{}"; +describe("{}", () => {{ // Configure the client to use the local cluster. anchor.setProvider(anchor.Provider.env()); const program = anchor.workspace.{} as Program<{}>; - it('Is initialized!', async () => {{ + it("Is initialized!", async () => {{ // Add your test here. const tx = await program.rpc.initialize({{}}); console.log("Your transaction signature", tx);