-
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.
chore: restore tests, but commented out
- Loading branch information
Showing
2 changed files
with
33 additions
and
33 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
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/testSetup'; | ||
import { expect } from 'chai'; | ||
import { stubSfCommandUx } from '@salesforce/sf-plugins-core'; | ||
import MetalintRun from '../../../src/commands/metalint/run.js'; | ||
// import { expect } from 'chai'; | ||
// import { stubSfCommandUx } from '@salesforce/sf-plugins-core'; | ||
// import MetalintRun from '../../../src/commands/metalint/run.js'; | ||
|
||
describe('metalint run', () => { | ||
const $$ = new TestContext(); | ||
let sfCommandStubs: ReturnType<typeof stubSfCommandUx>; | ||
// let sfCommandStubs: ReturnType<typeof stubSfCommandUx>; | ||
|
||
beforeEach(() => { | ||
sfCommandStubs = stubSfCommandUx($$.SANDBOX); | ||
// sfCommandStubs = stubSfCommandUx($$.SANDBOX); | ||
}); | ||
|
||
afterEach(() => { | ||
$$.restore(); | ||
}); | ||
|
||
it('runs hello', async () => { | ||
await MetalintRun.run([]); | ||
const output = sfCommandStubs.log | ||
.getCalls() | ||
.flatMap((c) => c.args) | ||
.join('\n'); | ||
expect(output).to.include('hello world'); | ||
}); | ||
// it('runs hello', async () => { | ||
// await MetalintRun.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 MetalintRun.run([]); | ||
expect(result.path).to.equal('/Users/tom.carman/dev/git/sf-metadata-linter/src/commands/metalint/run.ts'); | ||
}); | ||
// it('runs hello with --json and no provided name', async () => { | ||
// const result = await MetalintRun.run([]); | ||
// expect(result.path).to.equal('/Users/tom.carman/dev/git/sf-metadata-linter/src/commands/metalint/run.ts'); | ||
// }); | ||
|
||
it('runs hello world --name Astro', async () => { | ||
await MetalintRun.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 MetalintRun.run(['--name', 'Astro']); | ||
// const output = sfCommandStubs.log | ||
// .getCalls() | ||
// .flatMap((c) => c.args) | ||
// .join('\n'); | ||
// expect(output).to.include('hello Astro'); | ||
// }); | ||
}); |