Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing tests #300

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Fix failing tests #300

merged 1 commit into from
Jul 18, 2023

Conversation

ScottBrenner
Copy link
Owner

Summary

Resolving https://github.com/ScottBrenner/cfn-lint-action/actions/runs/5579137792/jobs/10194286881#step:5:87.

Other Information

$ npm run all

> [email protected] all /workspaces/cfn-lint-action
> npm run format && npm test && npm run build


> [email protected] format /workspaces/cfn-lint-action
> prettier --write .

.devcontainer/devcontainer.json 63ms
.eslintrc.json 3ms
action.yml 36ms
CHANGELOG.md 33ms
CODE_OF_CONDUCT.md 57ms
CONTRIBUTING.md 8ms
index.js 14ms
lib/setup.js 9ms
lib/utils/getInput.js 8ms
lib/utils/getInputs.js 8ms
lib/utils/helpers.js 16ms
lib/utils/installCLI.js 36ms
lib/utils/runCommand.js 6ms
package-lock.json 159ms
package.json 4ms
README.md 95ms
SECURITY.md 4ms
tests/getInput.test.js 14ms
tests/helpers.test.js 24ms
tests/runCommand.test.js 18ms
tests/setup.test.js 28ms

> [email protected] test /workspaces/cfn-lint-action
> jest --coverage --verbose && eslint . && prettier --check .

 PASS  tests/setup.test.js
  ✓ setup {
  platform: 'linux',
  input: {},
  expected: { version: '0.*', python: 'python3' }
} (6 ms)
  ✓ setup {
  platform: 'darwin',
  input: {},
  expected: { version: '0.*', python: 'python3' }
} (1 ms)
  ✓ setup {
  platform: 'win32',
  input: {},
  expected: { version: '0.*', python: 'python' }
} (1 ms)
  ✓ setup {
  platform: 'linux',
  input: { version: '0.44.4' },
  expected: { version: '0.44.4', python: 'python3' }
} (6 ms)
  ✓ setup {
  platform: 'linux',
  input: { python: 'python3' },
  expected: { version: '0.*', python: 'python3' }
} (1 ms)
  ✓ setup {
  platform: 'linux',
  input: { version: '0.44.4', python: 'python3' },
  expected: { version: '0.44.4', python: 'python3' }
} (1 ms)
  ✓ invalid input { version: 'not valid' } (21 ms)
  ✓ invalid input { version: 'not|valid' } (1 ms)

 PASS  tests/getInput.test.js
  getInput Test
    ✓ Returns Valid Value
    ✓ Handles Unsuccessul Value
    ✓ Handles Default Value

 PASS  tests/helpers.test.js
  helpers Test
    ✓ Returns Valid OS for Linux (1 ms)
    ✓ Returns Valid OS for MacOS
    ✓ Returns Valid OS for Windows (1 ms)
    ✓ Temporary Directory Contains String(s) (1 ms)
    ✓ Ensures Exec & IO which get called (1 ms)

Ran command: cfn-lint -t ./template.yml. Response is: 
::error::Error running command: cfn-lint -t ./template.yml. Returned error is: You have Errors in your Cloud Formation
 PASS  tests/runCommand.test.js
  runCommand Test
    ✓ Successfully handles passed CFN-Lint Command (2 ms)
    ✓ Successfully handles failure CFN-Lint Command (1 ms)

----------------|---------|----------|---------|---------|-------------------
File            | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
----------------|---------|----------|---------|---------|-------------------
All files       |   94.87 |      100 |     100 |   94.87 |                   
 lib            |   80.95 |      100 |     100 |   80.95 |                   
  setup.js      |   80.95 |      100 |     100 |   80.95 | 21-22,34-35       
 lib/utils      |     100 |      100 |     100 |     100 |                   
  getInput.js   |     100 |      100 |     100 |     100 |                   
  getInputs.js  |     100 |      100 |     100 |     100 |                   
  helpers.js    |     100 |      100 |     100 |     100 |                   
  installCLI.js |     100 |      100 |     100 |     100 |                   
  runCommand.js |     100 |      100 |     100 |     100 |                   
----------------|---------|----------|---------|---------|-------------------
Test Suites: 4 passed, 4 total
Tests:       18 passed, 18 total
Snapshots:   0 total
Time:        1.71 s
Ran all test suites.
Checking formatting...
All matched files use Prettier code style!

> [email protected] build /workspaces/cfn-lint-action
> ncc build index.js --out dist --license licenses.txt

ncc: Version 0.36.1
ncc: Compiling file index.js into CJS
  6kB  dist/licenses.txt
148kB  dist/index.js
154kB  [1471ms] - ncc 0.36.1

@ScottBrenner ScottBrenner added enhancement New feature or request good first issue Good for newcomers javascript Pull requests that update Javascript code labels Jul 18, 2023
@ScottBrenner ScottBrenner requested a review from NickLiffen July 18, 2023 02:25
@NickLiffen NickLiffen merged commit 30eb5af into main Jul 18, 2023
@NickLiffen NickLiffen deleted the fix-tests branch July 18, 2023 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants