cli: Make templates conform to default prettier rules (#1466)

This commit is contained in:
Tom Linton 2022-02-18 13:25:16 +13:00 committed by GitHub
parent 5ff9947ba2
commit 8aa7b2289e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 12 deletions

View File

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