Skip to content

Commit

Permalink
fix(casify): fix casify to also return original task name
Browse files Browse the repository at this point in the history
* fix(casify): fix casify to also return original task name

casify should also return original task name to avoid common user errors. For example, for task name
like e2e, it is not obvious to see that it converts to camelCase e2E and kebab-case e-2-e. This
avoids scripts must resolve to string error if user passes in the original task name over camelified
or kebabified task name

* style(style): fix styles

fix styles per travis build error log
  • Loading branch information
osdevisnot authored and Kent C. Dodds committed May 2, 2016
1 parent bb6d8b7 commit df7e4cd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 24 deletions.
56 changes: 33 additions & 23 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
{
"projectName": "p-s",
"projectOwner": "kentcdodds",
"files": [
"projectName": "p-s"
, "projectOwner": "kentcdodds"
, "files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
]
, "imageSize": 100
, "commit": false
, "contributors": [
{
"login": "kentcdodds",
"name": "Kent C. Dodds",
"avatar_url": "https://avatars.githubusercontent.com/u/1500684?v=3",
"profile": "http://kent.doddsfamily.us",
"contributions": [
"code",
"doc",
"infra",
"example"
"login": "kentcdodds"
, "name": "Kent C. Dodds"
, "avatar_url": "https://avatars.githubusercontent.com/u/1500684?v=3"
, "profile": "http://kent.doddsfamily.us"
, "contributions": [
"code"
, "doc"
, "infra"
, "example"
]
},
{
"login": "DavidWells",
"name": "David Wells",
"avatar_url": "https://avatars.githubusercontent.com/u/532272?v=3",
"profile": "http://davidwells.io",
"contributions": [
}
, {
"login": "DavidWells"
, "name": "David Wells"
, "avatar_url": "https://avatars.githubusercontent.com/u/532272?v=3"
, "profile": "http://davidwells.io"
, "contributions": [
"code"
]
}
, {
"login": "abhishekisnot"
, "name": "Abhishek Shende"
, "avatar_url": "https://avatars.githubusercontent.com/u/802242?v=3"
, "html_url": "https://github.com/abhishekisnot"
, "contributions": [
"code"
, "test"
]
}
]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ coverage
dist
.opt-in
.opt-out
npm-debug.log
2 changes: 1 addition & 1 deletion src/kebab-and-camel-casify.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ function kebabAndCamelCasify(obj) {
result[key] = val
}
return result
}, {})
}, obj)
}
1 change: 1 addition & 0 deletions src/kebab-and-camel-casify.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import kebabAndCamelCasify from './kebab-and-camel-casify'
testUnchanged({boo: 'baz'})
testUnchanged({boo: {bar: 'baz', foo: 'bar'}})

test({e2e: 'foo'}, {e2E: 'foo', 'e-2-e': 'foo', e2e: 'foo'}, 'shallow objects')
test({fooBar: 'baz'}, {fooBar: 'baz', 'foo-bar': 'baz'}, 'shallow objects')

test({
Expand Down

0 comments on commit df7e4cd

Please sign in to comment.