Skip to content

Commit

Permalink
fix: fix release test
Browse files Browse the repository at this point in the history
  • Loading branch information
jairo-bc committed Sep 12, 2024
1 parent 2acc729 commit 6c53ecc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions lib/release/release.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,12 @@ All notable changes to this project will be documented in this file.
error: jest.fn(),
warning: jest.fn(),
});
const getOctokitStub = () => ({
Octokit: jest.fn().mockImplementation(() => ({
repos: {
uploadReleaseAsset: jest.fn().mockResolvedValue(uploadReleaseAssetData),
createRelease: jest.fn().mockResolvedValue(releaseData),
},
})),
});
const getOctokitStub = () => jest.fn().mockImplementation(() => ({

Check warning on line 137 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-latest)

Insert `⏎·······`

Check warning on line 137 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (20.x, ubuntu-latest)

Insert `⏎·······`
repos: {

Check warning on line 138 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-latest)

Insert `····`

Check warning on line 138 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (20.x, ubuntu-latest)

Insert `····`
uploadReleaseAsset: jest.fn().mockResolvedValue(uploadReleaseAssetData),

Check warning on line 139 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-latest)

Replace `············` with `················`

Check warning on line 139 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (20.x, ubuntu-latest)

Replace `············` with `················`
createRelease: jest.fn().mockResolvedValue(releaseData),

Check warning on line 140 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-latest)

Insert `····`

Check warning on line 140 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (20.x, ubuntu-latest)

Insert `····`
},

Check warning on line 141 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-latest)

Insert `····`

Check warning on line 141 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (20.x, ubuntu-latest)

Insert `····`
}));

Check warning on line 142 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-latest)

Insert `····`

Check warning on line 142 in lib/release/release.spec.js

View workflow job for this annotation

GitHub Actions / build (20.x, ubuntu-latest)

Insert `····`
const createStencilReleaseInstance = (passedArgs) => {
const defaultMocks = {
git: getGitStub(),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint": "eslint . && prettier --check . --ignore-unknown",
"lint-and-fix": "eslint . --fix && prettier --write . --ignore-unknown",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"test-with-coverage": "jest --coverage --verbose",
"test-with-coverage": "npm run test --coverage --verbose",
"release": "semantic-release"
},
"bin": {
Expand Down

0 comments on commit 6c53ecc

Please sign in to comment.