Skip to content

Commit 3cd3f7c

Browse files
committed
cleanup tests
1 parent 7aa239d commit 3cd3f7c

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

src/__tests__/ParseQuery-test.js

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,29 +1903,20 @@ describe('ParseQuery', () => {
19031903
});
19041904

19051905
it('full text search key required', (done) => {
1906-
try {
1907-
const query = new ParseQuery('Item');
1908-
query.fullText();
1909-
} catch (e) {
1910-
done();
1911-
}
1906+
const query = new ParseQuery('Item');
1907+
expect(() => query.fullText()).toThrow('A key is required.');
1908+
done();
19121909
});
19131910

19141911
it('full text search value required', (done) => {
1915-
try {
19161912
const query = new ParseQuery('Item');
1917-
query.fullText('key');
1918-
} catch (e) {
1913+
expect(() => query.fullText('key')).toThrow('A search term is required');
19191914
done();
1920-
}
19211915
});
19221916

19231917
it('full text search value must be string', (done) => {
1924-
try {
1925-
const query = new ParseQuery('Item');
1926-
query.fullText('key', []);
1927-
} catch (e) {
1928-
done();
1929-
}
1918+
const query = new ParseQuery('Item');
1919+
expect(() => query.fullText('key', [])).toThrow('The value being searched for must be a string.');
1920+
done();
19301921
});
19311922
});

0 commit comments

Comments
 (0)