-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e473ca
commit ddd0b84
Showing
4 changed files
with
104 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; | ||
import { expect } from 'chai'; | ||
// import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; | ||
// import { expect } from 'chai'; | ||
|
||
describe('atlas generate csv NUTs', () => { | ||
let session: TestSession; | ||
// describe('atlas generate csv NUTs', () => { | ||
// let session: TestSession; | ||
|
||
before(async () => { | ||
session = await TestSession.create({ devhubAuthStrategy: 'NONE' }); | ||
}); | ||
// before(async () => { | ||
// session = await TestSession.create({ devhubAuthStrategy: 'NONE' }); | ||
// }); | ||
|
||
after(async () => { | ||
await session?.clean(); | ||
}); | ||
// after(async () => { | ||
// await session?.clean(); | ||
// }); | ||
|
||
it('should display provided name', () => { | ||
const name = 'World'; | ||
const command = `atlas generate csv --name ${name}`; | ||
const output = execCmd(command, { ensureExitCode: 0 }).shellOutput.stdout; | ||
expect(output).to.contain(name); | ||
}); | ||
}); | ||
// it('should display provided name', () => { | ||
// const name = 'World'; | ||
// const command = `atlas generate csv --name ${name}`; | ||
// const output = execCmd(command, { ensureExitCode: 0 }).shellOutput.stdout; | ||
// expect(output).to.contain(name); | ||
// }); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
import { TestContext } from '@salesforce/core/lib/testSetup.js'; | ||
import { expect } from 'chai'; | ||
import { stubSfCommandUx } from '@salesforce/sf-plugins-core'; | ||
import AtlasGenerateCsv from '../../../../src/commands/atlas/generate/csv.js'; | ||
// import { TestContext } from '@salesforce/core/lib/testSetup.js'; | ||
// import { expect } from 'chai'; | ||
// import { stubSfCommandUx } from '@salesforce/sf-plugins-core'; | ||
// import AtlasGenerateCsv from '../../../../src/commands/atlas/generate/csv.js'; | ||
|
||
describe('atlas generate csv', () => { | ||
const $$ = new TestContext(); | ||
let sfCommandStubs: ReturnType<typeof stubSfCommandUx>; | ||
// describe('atlas generate csv', () => { | ||
// const $$ = new TestContext(); | ||
// let sfCommandStubs: ReturnType<typeof stubSfCommandUx>; | ||
|
||
beforeEach(() => { | ||
sfCommandStubs = stubSfCommandUx($$.SANDBOX); | ||
}); | ||
// beforeEach(() => { | ||
// sfCommandStubs = stubSfCommandUx($$.SANDBOX); | ||
// }); | ||
|
||
afterEach(() => { | ||
$$.restore(); | ||
}); | ||
// afterEach(() => { | ||
// $$.restore(); | ||
// }); | ||
|
||
it('runs hello', async () => { | ||
await AtlasGenerateCsv.run([]); | ||
const output = sfCommandStubs.log | ||
.getCalls() | ||
.flatMap((c) => c.args) | ||
.join('\n'); | ||
expect(output).to.include('hello world'); | ||
}); | ||
// it('runs hello', async () => { | ||
// await AtlasGenerateCsv.run([]); | ||
// const output = sfCommandStubs.log | ||
// .getCalls() | ||
// .flatMap((c) => c.args) | ||
// .join('\n'); | ||
// expect(output).to.include('hello world'); | ||
// }); | ||
|
||
it('runs hello with --json and no provided name', async () => { | ||
const result = await AtlasGenerateCsv.run([]); | ||
expect(result.path).to.equal('/Users/andres/Projects/proj-plugins/plugin-atlas/src/commands/atlas/generate/csv.ts'); | ||
}); | ||
// it('runs hello with --json and no provided name', async () => { | ||
// const result = await AtlasGenerateCsv.run([]); | ||
// expect(result.path).to.equal('/Users/andres/Projects/proj-plugins/plugin-atlas/src/commands/atlas/generate/csv.ts'); | ||
// }); | ||
|
||
it('runs hello world --name Astro', async () => { | ||
await AtlasGenerateCsv.run(['--name', 'Astro']); | ||
const output = sfCommandStubs.log | ||
.getCalls() | ||
.flatMap((c) => c.args) | ||
.join('\n'); | ||
expect(output).to.include('hello Astro'); | ||
}); | ||
}); | ||
// it('runs hello world --name Astro', async () => { | ||
// await AtlasGenerateCsv.run(['--name', 'Astro']); | ||
// const output = sfCommandStubs.log | ||
// .getCalls() | ||
// .flatMap((c) => c.args) | ||
// .join('\n'); | ||
// expect(output).to.include('hello Astro'); | ||
// }); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; | ||
import { expect } from 'chai'; | ||
// import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; | ||
// import { expect } from 'chai'; | ||
|
||
describe('atlas generate xlsx NUTs', () => { | ||
let session: TestSession; | ||
// describe('atlas generate xlsx NUTs', () => { | ||
// let session: TestSession; | ||
|
||
before(async () => { | ||
session = await TestSession.create({ devhubAuthStrategy: 'NONE' }); | ||
}); | ||
// before(async () => { | ||
// session = await TestSession.create({ devhubAuthStrategy: 'NONE' }); | ||
// }); | ||
|
||
after(async () => { | ||
await session?.clean(); | ||
}); | ||
// after(async () => { | ||
// await session?.clean(); | ||
// }); | ||
|
||
it('should display provided name', () => { | ||
const name = 'World'; | ||
const command = `atlas generate xlsx --name ${name}`; | ||
const output = execCmd(command, { ensureExitCode: 0 }).shellOutput.stdout; | ||
expect(output).to.contain(name); | ||
}); | ||
}); | ||
// it('should display provided name', () => { | ||
// const name = 'World'; | ||
// const command = `atlas generate xlsx --name ${name}`; | ||
// const output = execCmd(command, { ensureExitCode: 0 }).shellOutput.stdout; | ||
// expect(output).to.contain(name); | ||
// }); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
import { TestContext } from '@salesforce/core/lib/testSetup.js'; | ||
import { expect } from 'chai'; | ||
import { stubSfCommandUx } from '@salesforce/sf-plugins-core'; | ||
import AtlasGenerateXlsx from '../../../../src/commands/atlas/generate/xlsx.js'; | ||
// import { TestContext } from '@salesforce/core/lib/testSetup.js'; | ||
// import { expect } from 'chai'; | ||
// import { stubSfCommandUx } from '@salesforce/sf-plugins-core'; | ||
// import AtlasGenerateXlsx from '../../../../src/commands/atlas/generate/xlsx.js'; | ||
|
||
describe('atlas generate xlsx', () => { | ||
const $$ = new TestContext(); | ||
let sfCommandStubs: ReturnType<typeof stubSfCommandUx>; | ||
// describe('atlas generate xlsx', () => { | ||
// const $$ = new TestContext(); | ||
// let sfCommandStubs: ReturnType<typeof stubSfCommandUx>; | ||
|
||
beforeEach(() => { | ||
sfCommandStubs = stubSfCommandUx($$.SANDBOX); | ||
}); | ||
// beforeEach(() => { | ||
// sfCommandStubs = stubSfCommandUx($$.SANDBOX); | ||
// }); | ||
|
||
afterEach(() => { | ||
$$.restore(); | ||
}); | ||
// afterEach(() => { | ||
// $$.restore(); | ||
// }); | ||
|
||
it('runs hello', async () => { | ||
await AtlasGenerateXlsx.run([]); | ||
const output = sfCommandStubs.log | ||
.getCalls() | ||
.flatMap((c) => c.args) | ||
.join('\n'); | ||
expect(output).to.include('hello world'); | ||
}); | ||
// it('runs hello', async () => { | ||
// await AtlasGenerateXlsx.run([]); | ||
// const output = sfCommandStubs.log | ||
// .getCalls() | ||
// .flatMap((c) => c.args) | ||
// .join('\n'); | ||
// expect(output).to.include('hello world'); | ||
// }); | ||
|
||
it('runs hello with --json and no provided name', async () => { | ||
const result = await AtlasGenerateXlsx.run([]); | ||
expect(result.path).to.equal( | ||
'/Users/andres/Projects/proj-plugins/plugin-atlas/src/commands/atlas/generate/xlsx.ts' | ||
); | ||
}); | ||
// it('runs hello with --json and no provided name', async () => { | ||
// const result = await AtlasGenerateXlsx.run([]); | ||
// expect(result.path).to.equal( | ||
// '/Users/andres/Projects/proj-plugins/plugin-atlas/src/commands/atlas/generate/xlsx.ts' | ||
// ); | ||
// }); | ||
|
||
it('runs hello world --name Astro', async () => { | ||
await AtlasGenerateXlsx.run(['--name', 'Astro']); | ||
const output = sfCommandStubs.log | ||
.getCalls() | ||
.flatMap((c) => c.args) | ||
.join('\n'); | ||
expect(output).to.include('hello Astro'); | ||
}); | ||
}); | ||
// it('runs hello world --name Astro', async () => { | ||
// await AtlasGenerateXlsx.run(['--name', 'Astro']); | ||
// const output = sfCommandStubs.log | ||
// .getCalls() | ||
// .flatMap((c) => c.args) | ||
// .join('\n'); | ||
// expect(output).to.include('hello Astro'); | ||
// }); | ||
// }); |