-
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 #544 from swrlab/dev/update-1.1.3
Update v1.1.3
- Loading branch information
Showing
10 changed files
with
291 additions
and
203 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
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,38 @@ | ||
name: Test on Pull | ||
|
||
on: | ||
pull_request_target: | ||
types: [labeled] | ||
|
||
env: | ||
NODE_VERSION: 18 | ||
|
||
jobs: | ||
security: | ||
name: Check permissions for pull request runs | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.pull_request.labels.*.name, 'safe to test') | ||
steps: | ||
- run: | | ||
echo "Security checks passed!" | ||
test: | ||
needs: security | ||
name: Run Mocha Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 👀 Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: 🏗 Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: "yarn" | ||
cache-dependency-path: "**/yarn.lock" | ||
|
||
- name: 📦 Install Dependencies | ||
run: yarn | ||
|
||
- name: 🧪 Run Tests | ||
run: yarn lint && yarn test |
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
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
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,5 +1,7 @@ | ||
const toReadable = require('../numbers/toReadable') | ||
|
||
// pluralize value to values or use custom plural | ||
module.exports = (count, singular, plural) => { | ||
const multi = plural ?? `${singular}s` | ||
return `${count} ${count !== 1 ? multi : singular}` | ||
return `${toReadable(count)} ${count !== 1 ? multi : singular}` | ||
} |
Oops, something went wrong.