Skip to content

Commit

Permalink
chore: fixtures: update
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Jul 13, 2024
1 parent cf289ef commit 9aa533e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function isJson(str) {
try {
return Boolean(JSON.parse(str));
} catch (ex) {
} catch(ex) {
return false;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
try {
console.log('hi');
} catch (e) {}
} catch(e) {}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
try {} catch (error_used) {
try {} catch(error_used) {
console.log(error_used);
}

try {} catch {}

try {} catch ({}) {}
try {} catch({}) {}

try {} catch ({}) {}
try {} catch({}) {}
17 changes: 0 additions & 17 deletions packages/plugin-remove-useless-return/test/fixture/block-fix.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/plugin-try-catch/lib/async/fixture/couple-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (error) {

try {
await isValidPackageJson('path/to/');
} catch (error) {
} catch(error) {
// @ts-ignore
expect(error.message).toMatch('No package name provided in package.json');
}
2 changes: 1 addition & 1 deletion packages/plugin-try-catch/lib/sync/fixture/couple-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (error) {

try {
isValidPackageJson('path/to/');
} catch (error) {
} catch(error) {
// @ts-ignore
expect(error.message).toMatch('No package name provided in package.json');
}
2 changes: 1 addition & 1 deletion packages/plugin-try-catch/lib/sync/fixture/no-call.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ let packageJson;

try {
packageJson = require(path.join(addonPath, 'package.json'));
} catch (e) {
} catch(e) {
// swallow as changing branches can leave folders around
}

0 comments on commit 9aa533e

Please sign in to comment.