Migrated tests to jest
Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
This commit is contained in:
9
test4/isValidJSON/isValidJSON.js
Normal file
9
test4/isValidJSON/isValidJSON.js
Normal file
@ -0,0 +1,9 @@
|
||||
const isValidJSON = obj => {
|
||||
try {
|
||||
JSON.parse(obj);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
module.exports = isValidJSON;
|
||||
Reference in New Issue
Block a user