Skip to content

Commit

Permalink
refactor: test with latest plugin version
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarvin8 committed Oct 8, 2024
1 parent 8b5132b commit db0d088
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/nut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
node-version: 18
cache: yarn
registry-url: 'https://registry.npmjs.org'
check-latest: true
node-options: "--experimental-specifier-resolution=node"

- name: Install Dependencies
run: yarn install
Expand All @@ -38,13 +36,9 @@ jobs:
- name: Install salesforce CLI
run: npm install -g @salesforce/cli

- name: Clear Yarn Cache (Ubuntu)
if: runner.os == 'Linux'
run: yarn cache clean

- name: Install plugin
run: |
sf plugins:link .
echo y | sf plugins install apex-code-coverage-transformer@latest
sf plugins
- name: Run NUT
Expand Down
6 changes: 3 additions & 3 deletions test/commands/transformer/transform.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ describe('acc transformer NUTs', () => {
});

it('runs transform on the deploy coverage file without file extensions.', async () => {
const command = `acc-transformer transform --coverage-json "${deployCoverageNoExts}" --xml "${testXmlPath1}"`;
const command = `apex-code-coverage transformer transform --coverage-json "${deployCoverageNoExts}" --xml "${testXmlPath1}"`;
const output = execCmd(command, { ensureExitCode: 0, cli: 'sf' }).shellOutput.stdout;

expect(output.replace('\n', '')).to.equal(`The coverage XML has been written to ${testXmlPath1}`);
});

it('runs transform on the deploy coverage file with file extensions.', async () => {
const command = `acc-transformer transform --coverage-json "${deployCoverageWithExts}" --xml "${testXmlPath2}"`;
const command = `apex-code-coverage transformer transform --coverage-json "${deployCoverageWithExts}" --xml "${testXmlPath2}"`;
const output = execCmd(command, { ensureExitCode: 0, cli: 'sf' }).shellOutput.stdout;

expect(output.replace('\n', '')).to.equal(`The coverage XML has been written to ${testXmlPath2}`);
});

it('runs transform on the test coverage file.', async () => {
const command = `acc-transformer transform --coverage-json "${testCoverage}" --xml "${testXmlPath3}"`;
const command = `apex-code-coverage transformer transform --coverage-json "${testCoverage}" --xml "${testXmlPath3}"`;
const output = execCmd(command, { ensureExitCode: 0, cli: 'sf' }).shellOutput.stdout;

expect(output.replace('\n', '')).to.equal(`The coverage XML has been written to ${testXmlPath3}`);
Expand Down

0 comments on commit db0d088

Please sign in to comment.