File tree Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -1903,29 +1903,20 @@ describe('ParseQuery', () => {
1903
1903
} ) ;
1904
1904
1905
1905
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 ( ) ;
1912
1909
} ) ;
1913
1910
1914
1911
it ( 'full text search value required' , ( done ) => {
1915
- try {
1916
1912
const query = new ParseQuery ( 'Item' ) ;
1917
- query . fullText ( 'key' ) ;
1918
- } catch ( e ) {
1913
+ expect ( ( ) => query . fullText ( 'key' ) ) . toThrow ( 'A search term is required' ) ;
1919
1914
done ( ) ;
1920
- }
1921
1915
} ) ;
1922
1916
1923
1917
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 ( ) ;
1930
1921
} ) ;
1931
1922
} ) ;
You can’t perform that action at this time.
0 commit comments