enable unit tests in CI (#15)

Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
Brian DeHamer
2024-02-28 10:45:31 -08:00
committed by GitHub
parent 6bbf2f4ab0
commit 32049315c5
4 changed files with 12 additions and 5 deletions
+5 -5
View File
@@ -41,17 +41,17 @@ jobs:
- name: Lint
id: npm-lint
run: npm run lint
# - name: Test
# id: npm-ci-test
# run: npm run ci-test
- name: Test
id: npm-ci-test
run: npm run ci-test
test-attest:
name: Test attest action
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
id-token: write
packages: write
env:
SUBJECT: /repos/${{ github.repository }}/tarball/${{ github.sha }}
steps:
+3
View File
@@ -21,6 +21,9 @@ const getBooleanInputMock = jest.spyOn(core, 'getBooleanInput')
const setOutputMock = jest.spyOn(core, 'setOutput')
const setFailedMock = jest.spyOn(core, 'setFailed')
// Ensure that setFailed doesn't set an exit code during tests
setFailedMock.mockImplementation(() => {})
const summaryWriteMock = jest.spyOn(core.summary, 'write')
summaryWriteMock.mockImplementation(async () => Promise.resolve(core.summary))
+1
View File
@@ -0,0 +1 @@
process.stdout.write = jest.fn()
+3
View File
@@ -39,6 +39,9 @@
"license": "MIT",
"jest": {
"preset": "ts-jest",
"setupFilesAfterEnv": [
"./jest.setup.js"
],
"verbose": true,
"clearMocks": true,
"testEnvironment": "node",