Skip to content

Commit

Permalink
simplify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dplewis committed Mar 26, 2024
1 parent 06a133c commit fd5550c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/__tests__/ParseObject-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,12 +909,9 @@ describe('ParseObject', () => {

it('validates attributes on save()', async () => {
const o = new ParseObject('Listing');
try {
await o.save({ '$$$': 'o_O' });
expect(true).toBe(false);
} catch (e) {
expect(e.code).toBe(ParseError.INVALID_KEY_NAME);
}
await expect(o.save({ '$$$': 'o_O' })).rejects.toEqual(
new ParseError(ParseError.INVALID_KEY_NAME)
);
});

it('ignores validation if ignoreValidation option is passed to set()', () => {
Expand Down

0 comments on commit fd5550c

Please sign in to comment.