-
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.
Merge pull request #2 from steffendietz/tests-and-upgrades
updated packages
- Loading branch information
Showing
10 changed files
with
7,023 additions
and
298 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,4 +1,2 @@ | ||
.devcontainer | ||
node_modules | ||
clover.xml | ||
shieldsio.json | ||
node_modules |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const ghrun = require('github-action-ts-run-api'); | ||
const fs = require('fs'); | ||
|
||
test('test creation of sieldsio.json', async () => { | ||
// RunTarget.preJsScript() and RunTarget.postJsScript() are also available | ||
const target = ghrun.RunTarget.jsFile('index.js', 'action.yml'); | ||
const options = ghrun.RunOptions.create() | ||
// Internally, runner will fake a json file to be picked by @actions/github | ||
.setGithubContext({ payload: { pull_request: { number: 123 } } }) | ||
.setWorkspaceDir('tests'); | ||
|
||
const res = await target.run(options); | ||
|
||
let rawdata = fs.readFileSync('tests/shieldsio.json'); | ||
let shieldsio = JSON.parse(rawdata); | ||
|
||
expect(shieldsio).toHaveProperty('message', '91.23%'); | ||
}); |
Oops, something went wrong.