Skip to content

Commit

Permalink
Prettify with Prettier v2 and no trailing commas
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueWill committed Mar 22, 2020
1 parent 7209953 commit 25901bf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"singleQuote": true
"singleQuote": true,
"trailingComma": "none"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Feature parity with Scientist is _not_ a goal.

- TypeScript strict option
- No classes
- Prettier with single quotes
- Prettier 2 with single quotes and no trailing commas
- No ESLint warnings/errors
- All tests pass
- No dependencies (other than devDependencies)
Expand Down
2 changes: 1 addition & 1 deletion src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ describe('experiment', () => {

describe('experimentAsync', () => {
const sleep = (ms: number): Promise<void> =>
new Promise(resolve => setTimeout(resolve, ms));
new Promise((resolve) => setTimeout(resolve, ms));

describe('when functions are equivalent', () => {
const publishMock: jest.Mock<
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,17 @@ export function experimentAsync<TParams extends any[], TResult>({
if (isEnabled) {
// Run in parallel
[candidateResult, controlResult] = await Promise.all([
candidate(...args).catch(e => {
candidate(...args).catch((e) => {
candidateError = e;
return undefined;
}),
control(...args).catch(e => {
control(...args).catch((e) => {
controlError = e;
return undefined;
})
]);
} else {
controlResult = await control(...args).catch(e => {
controlResult = await control(...args).catch((e) => {
controlError = e;
return undefined;
});
Expand Down

0 comments on commit 25901bf

Please sign in to comment.