-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
3,988 additions
and
4,987 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
insert_final_newline = true | ||
|
||
[{package,package-lock,tsconfig}.json] | ||
indent_size = 3 | ||
|
||
[*.{ts,js}] | ||
indent_size = 4 |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{ | ||
"files.exclude": { | ||
"node_modules": true | ||
}, | ||
"prettier.printWidth": 120, | ||
"prettier.tabWidth": 4 | ||
} | ||
} | ||
} |
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,13 @@ | ||
# Contributing guidelines | ||
|
||
<h2 style="color: red;">DON'T</h2> | ||
|
||
### **Never create a pull request for master.** | ||
|
||
<h2 style="color: green;">DO</h2> | ||
|
||
- ### Checkout a release branch corresponding to the version you want to contribute to | ||
- ### Make your changes and create a pull request | ||
- ### Your request will be merged once it is reviewed | ||
|
||
## Thank you for reading |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
beforeEach(() => jest.resetModules()); | ||
|
||
describe("getPreferredRef()", () => { | ||
test("Should be heads", () => { | ||
jest.doMock("src", () => ({ | ||
preferences: { preferBranchRelease: true }, | ||
})); | ||
return import("src/functions").then(({ getPreferredRef }) => | ||
expect(getPreferredRef()).toBe("heads") | ||
); | ||
}); | ||
|
||
test("Should be tags", () => { | ||
jest.doMock("src", () => ({ | ||
preferences: { preferBranchRelease: false }, | ||
})); | ||
return import("src/functions").then(({ getPreferredRef }) => | ||
expect(getPreferredRef()).toBe("tags") | ||
); | ||
}); | ||
}); |
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,36 @@ | ||
beforeEach(() => jest.resetModules()); | ||
|
||
describe("preferences.publishLatestTag", () => { | ||
it("Should have been set to false", () => | ||
import("src").then(({ preferences }) => | ||
expect(preferences.publishLatestTag).toBe(false) | ||
)); | ||
|
||
it("Should have been set to true when deprecated input is true", () => { | ||
process.env.INPUT_PUBLISH_LATEST = "true"; | ||
return import("src").then(({ preferences }) => | ||
expect(preferences.publishLatestTag).toBe(true) | ||
); | ||
}); | ||
|
||
it("Should have been set to true when input is true", () => { | ||
process.env.INPUT_PUBLISH_LATEST_TAG = "true"; | ||
return import("src").then(({ preferences }) => | ||
expect(preferences.publishLatestTag).toBe(true) | ||
); | ||
}); | ||
}); | ||
|
||
describe("preferences.preferBranchRelease", () => { | ||
it("Should have been set to false", () => | ||
import("src").then(({ preferences }) => | ||
expect(preferences.preferBranchRelease).toBe(false) | ||
)); | ||
|
||
it("Should have been set to true when input is true", () => { | ||
process.env.INPUT_PREFER_BRANCH_RELEASES = "true"; | ||
return import("src").then(({ preferences }) => | ||
expect(preferences.preferBranchRelease).toBe(true) | ||
); | ||
}); | ||
}); |
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,8 @@ | ||
// https://kulshekhar.github.io/ts-jest/user/config/ | ||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
modulePaths: ["<rootDir>/"], | ||
verbose: true, | ||
globalSetup: "<rootDir>/test-setup.ts", | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.