Skip to content

Commit 8acd82f

Browse files
VivekFitkariwalasezna
authored andcommitted
Updating test cases according to yargs update
1 parent 69aaec2 commit 8acd82f

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

.all-contributorsrc

+9
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,15 @@
447447
"infra",
448448
"review"
449449
]
450+
},
451+
{
452+
"login": "VivekFitkariwala",
453+
"name": "Vivek Fitkariwala",
454+
"avatar_url": "https://avatars2.githubusercontent.com/u/3822890?v=4",
455+
"profile": "https://github.com/VivekFitkariwala",
456+
"contributions": [
457+
"code"
458+
]
450459
}
451460
],
452461
"repoType": "github"

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ All the benefits of npm scripts without the cost of a bloated package.json and l
1313
[![downloads][downloads-badge]][npm-stat]
1414
[![MIT License][license-badge]][license]
1515

16-
[![All Contributors](https://img.shields.io/badge/all_contributors-43-orange.svg?style=flat-square)](#contributors)
16+
[![All Contributors](https://img.shields.io/badge/all_contributors-45-orange.svg?style=flat-square)](#contributors)
1717
[![PRs Welcome][prs-badge]][prs]
1818
[![Donate][donate-badge]][donate]
1919
[![Code of Conduct][coc-badge]][coc]
@@ -519,7 +519,7 @@ Thanks goes to these people ([emoji key][emojis]):
519519
| [<img src="https://avatars.githubusercontent.com/u/2915616?v=3" width="100px;"/><br /><sub><b>Erik Fox</b></sub>](http://www.erikfox.co/)<br />[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Aerikfox "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=erikfox "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=erikfox "Documentation") [⚠️](https://github.com/kentcdodds/p-s/commits?author=erikfox "Tests") | [<img src="https://avatars.githubusercontent.com/u/5351262?v=3" width="100px;"/><br /><sub><b>Aditya Pratap Singh</b></sub>](http://blog.adityapsingh.com)<br />[👀](#review-addityasingh "Reviewed Pull Requests") | [<img src="https://avatars.githubusercontent.com/u/7687132?v=3" width="100px;"/><br /><sub><b>bumbleblym</b></sub>](https://github.com/bumbleblym)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=bumbleblym "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=bumbleblym "Documentation") | [<img src="https://avatars.githubusercontent.com/u/7091543?v=3" width="100px;"/><br /><sub><b>Islam Attrash</b></sub>](https://twitter.com/IslamAttrash)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=Attrash-Islam "Code") | [<img src="https://avatars.githubusercontent.com/u/7215306?v=3" width="100px;"/><br /><sub><b>JasonSooter</b></sub>](https://github.com/JasonSooter)<br />[📖](https://github.com/kentcdodds/p-s/commits?author=JasonSooter "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/116871?v=3" width="100px;"/><br /><sub><b>Nate Cavanaugh</b></sub>](http://alterform.com)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=natecavanaugh "Code") | [<img src="https://avatars2.githubusercontent.com/u/3534924?v=3" width="100px;"/><br /><sub><b>Wissam Abirached</b></sub>](https://designingforscale.com)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=wabirached "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=wabirached "Tests") |
520520
| [<img src="https://avatars1.githubusercontent.com/u/12592677?v=3" width="100px;"/><br /><sub><b>Paweł Mikołajczyk</b></sub>](https://github.com/Miklet)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=Miklet "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=Miklet "Tests") | [<img src="https://avatars0.githubusercontent.com/u/1295580?v=3" width="100px;"/><br /><sub><b>Kyle Welch</b></sub>](http://www.krwelch.com)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=kwelch "Code") [⚠️](https://github.com/kentcdodds/p-s/commits?author=kwelch "Tests") | [<img src="https://avatars3.githubusercontent.com/u/22868432?v=3" width="100px;"/><br /><sub><b>Lufty Wiranda</b></sub>](http://instagram.com/luftywiranda13)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=luftywiranda13 "Code") | [<img src="https://avatars6.githubusercontent.com/u/2936644?v=4" width="100px;"/><br /><sub><b>Bhargav Ponnapalli</b></sub>](http://imbhargav5.com)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=imbhargav5 "Code") | [<img src="https://avatars0.githubusercontent.com/u/1538572?v=4" width="100px;"/><br /><sub><b>falieson</b></sub>](https://github.com/Falieson)<br />[📖](https://github.com/kentcdodds/p-s/commits?author=Falieson "Documentation") [🔧](#tool-Falieson "Tools") | [<img src="https://avatars2.githubusercontent.com/u/22251956?v=4" width="100px;"/><br /><sub><b>Suhas Karanth</b></sub>](https://github.com/sudo-suhas)<br />[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Asudo-suhas "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=sudo-suhas "Code") | [<img src="https://avatars3.githubusercontent.com/u/1228867?v=4" width="100px;"/><br /><sub><b>Eric Skram</b></sub>](http://www.ericskram.com)<br />[📖](https://github.com/kentcdodds/p-s/commits?author=Vpr99 "Documentation") |
521521
| [<img src="https://avatars2.githubusercontent.com/u/11901111?v=4" width="100px;"/><br /><sub><b>Kether Saturnius</b></sub>](http://www.k3th3r.com)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=iamkether "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=iamkether "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/2536916?v=4" width="100px;"/><br /><sub><b>Sviatoslav</b></sub>](https://github.com/SleepWalker)<br />[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3ASleepWalker "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=SleepWalker "Code") | [<img src="https://avatars2.githubusercontent.com/u/1470998?v=4" width="100px;"/><br /><sub><b>Wei Wang</b></sub>](https://github.com/onlywei)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=onlywei "Code") | [<img src="https://avatars2.githubusercontent.com/u/1393142?v=4" width="100px;"/><br /><sub><b>Sami Jaber</b></sub>](http://twitter.com/samjabz)<br />[🐛](https://github.com/kentcdodds/p-s/issues?q=author%3Asamijaber "Bug reports") [💻](https://github.com/kentcdodds/p-s/commits?author=samijaber "Code") | [<img src="https://avatars3.githubusercontent.com/u/28313487?v=4" width="100px;"/><br /><sub><b>Florian Löchle</b></sub>](https://github.com/schottilol)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=schottilol "Code") | [<img src="https://avatars2.githubusercontent.com/u/15851351?v=4" width="100px;"/><br /><sub><b>Kevin J</b></sub>](https://github.com/kevjin)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=kevjin "Code") | [<img src="https://avatars2.githubusercontent.com/u/3784470?v=4" width="100px;"/><br /><sub><b>Ben Teichman</b></sub>](http://www.benteichman.ca)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=effervescentia "Code") [📖](https://github.com/kentcdodds/p-s/commits?author=effervescentia "Documentation") |
522-
| [<img src="https://avatars3.githubusercontent.com/u/12157751?v=4" width="100px;"/><br /><sub><b>Alex Hansen</b></sub>](http://alex-hansen.com)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=sezna "Code") [🚇](#infra-sezna "Infrastructure (Hosting, Build-Tools, etc)") [👀](#review-sezna "Reviewed Pull Requests") |
522+
| [<img src="https://avatars3.githubusercontent.com/u/12157751?v=4" width="100px;"/><br /><sub><b>Alex Hansen</b></sub>](http://alex-hansen.com)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=sezna "Code") [🚇](#infra-sezna "Infrastructure (Hosting, Build-Tools, etc)") [👀](#review-sezna "Reviewed Pull Requests") | [<img src="https://avatars3.githubusercontent.com/u/4335849?v=4" width="100px;"/><br /><sub><b>Casey Primozic</b></sub>](https://cprimozic.com)<br />[🚇](#infra-ameobea "Infrastructure (Hosting, Build-Tools, etc)") [👀](#review-ameobea "Reviewed Pull Requests") | [<img src="https://avatars2.githubusercontent.com/u/3822890?v=4" width="100px;"/><br /><sub><b>Vivek Fitkariwala</b></sub>](https://github.com/VivekFitkariwala)<br />[💻](https://github.com/kentcdodds/p-s/commits?author=VivekFitkariwala "Code") |
523523
<!-- ALL-CONTRIBUTORS-LIST:END -->
524524

525525
This project follows the [all-contributors][all-contributors] specification.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"readline-sync": "^1.4.7",
3131
"spawn-command-with-kill": "^1.0.0",
3232
"type-detect": "^4.0.3",
33-
"yargs": "^8.0.2"
33+
"yargs": "14.2.0"
3434
},
3535
"devDependencies": {
3636
"all-contributors-cli": "^4.3.0",
@@ -63,7 +63,8 @@
6363
],
6464
"rules": {
6565
"max-len": "off",
66-
"max-lines": "off"
66+
"max-lines": "off",
67+
"no-useless-escape": "off"
6768
}
6869
},
6970
"lint-staged": {

src/bin-utils/__tests__/parser.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ test('happy path', () => {
128128
const {argv, psConfig} = parse('"build --fast"')
129129
expect(mockBinUtils.loadConfig).toHaveBeenCalledTimes(1)
130130
expect(psConfig.isMock).toBe(true)
131-
expect(argv).toMatchObject({_: ['build --fast']})
131+
expect(argv).toEqual(expect.objectContaining({_: [`\"build --fast\"`]}))
132132
})
133133

134134
test('with CLI config', () => {
@@ -141,11 +141,13 @@ test('with CLI config', () => {
141141
expect(mockBinUtils.loadConfig).toHaveBeenCalledTimes(1)
142142
expect(mockBinUtils.loadCLIConfig).toHaveBeenCalledTimes(1)
143143
expect(psConfig.isMock).toBe(true)
144-
expect(argv).toMatchObject({
145-
_: ['build --fast'],
146-
require: 'ts-node/register',
147-
config: 'package-scripts.ts',
148-
})
144+
expect(argv).toEqual(
145+
expect.objectContaining({
146+
_: [`\"build --fast\"`],
147+
require: 'ts-node/register',
148+
config: 'package-scripts.ts',
149+
}),
150+
)
149151

150152
delete mockFindUp.mock.cliReturn
151153
delete mockBinUtils.mock.cliConfig

0 commit comments

Comments
 (0)