Created
May 27, 2019 07:12
-
-
Save hkbu-kennycheng/1977ec355d8b20fe1bcd092feaba356a to your computer and use it in GitHub Desktop.
sails-firestore adapter test result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Migratable Interface | |
migrate: "alter" | |
✓ should have the proper migrate setting when bootstrapping | |
teardown and migrate existing data | |
✓ should retain the data when bootstrapped the second time (314ms) | |
migrate: "alter" with custom table and column names | |
✓ should have the proper migrate setting when bootstrapping | |
teardown and migrate existing data | |
✓ should retain the data when bootstrapped the second time (305ms) | |
Migratable Interface | |
migrate: "drop" | |
✓ should have the proper migrate setting when bootstrapping | |
teardown and drop existing data | |
✓ should not retain the data when bootstrapped the second time (210ms) | |
Migratable Interface | |
migrate: "safe" | |
✓ should have the proper migrate setting when bootstrapping | |
teardown and migrate existing data | |
✓ should retain the data when bootstrapped the second time (103ms) | |
Semantic Interface | |
.create() | |
✓ should create a new record (106ms) | |
✓ should return a generated PK | |
✓ should return generated timestamps | |
✓ should normalize undefined values to base values (59ms) | |
✓ should support creating protected query language attributes (65ms) | |
Semantic Interface | |
.createEach() | |
✓ should create a set of users (68ms) | |
✓ should insert 2 records verififed by find (45ms) | |
✓ should return generated timestamps (38ms) | |
✓ should support creating protected query language attributes (55ms) | |
Semantic Interface | |
.destroy() | |
a single record | |
✓ should destroy a record (82ms) | |
with numeric ID | |
✓ should destroy a record (68ms) | |
✓ should return an empty array when searched for | |
multiple records | |
✓ should destroy all the records (82ms) | |
✓ should return an empty array when searched for | |
Semantic Interface | |
.find() | |
✓ should return 10 records | |
✓ should return 1 record when searching for a specific record (integer test) with find | |
✓ should parse multi-level criteria | |
✓ should return generated timestamps (39ms) | |
✓ should work with no criteria passed in | |
Semantic Interface | |
.findOne() | |
✓ should return a single record | |
✓ should return generated timestamps | |
✓ should return null if a record is not found | |
✓ should work with just an id passed in | |
Semantic Interface | |
.findOrCreate() | |
✓ should create a new record (97ms) | |
✓ should return a single record | |
✓ should only have a single record in the database (44ms) | |
✓ should return generated timestamps (93ms) | |
Semantic Interface | |
Boolean Type | |
with valid data | |
✓ should store proper boolean value (60ms) | |
Semantic Interface | |
JSON Type | |
with valid data | |
✓ should store proper object value (84ms) | |
✓ should store proper array value (92ms) | |
✓ should store proper string value (82ms) | |
✓ should store proper numeric value (75ms) | |
✓ should store proper boolean value (84ms) | |
✓ should store proper null value (74ms) | |
Semantic Interface | |
Number Type | |
with valid data | |
✓ should store proper integer (87ms) | |
Semantic Interface | |
Ref Type | |
with valid data | |
- should store proper binary value | |
Semantic Interface | |
String Type | |
with valid data | |
✓ should store proper string value (81ms) | |
Semantic Interface | |
.update() | |
attributes | |
✓ should update attribute values (102ms) | |
✓ should return generated timestamps (85ms) | |
✓ should work with just an ID passed in (65ms) | |
✓ should work with an empty dictionary (78ms) | |
✓ should work with null values (52ms) | |
✓ should work when changing a user's primary key value (59ms) | |
✓ should update attribute values without supplying required fields (67ms) | |
find updated records | |
✓ should allow the record to be found | |
SQL Interface | |
.find() | |
✓ should escape attribute names to prevent SQL injection attacks | |
✓ should escape values when using startsWith modifier to prevent SQL injection attacks | |
✓ should escape values when using endsWith modifier to prevent SQL injection attacks | |
✓ should escape values when using contains modifier to prevent SQL injection attacks (53ms) | |
✓ should escape values when using like modifier to prevent SQL injection attacks | |
✓ should not unneccessarily escape values in criteria | |
Queryable Interface | |
count() | |
✓ should accurately count records | |
Queryable Interface | |
like modifier | |
✓ should return all the users with the given name (41ms) | |
Queryable Interface | |
AVG Query Modifier | |
✓ should average by key and only return that key with the average value (45ms) | |
Queryable Interface | |
Modifiers | |
contains | |
full where criteria | |
✓ should return the user with the correct name (132ms) | |
Queryable Interface | |
Modifiers | |
endsWith | |
full where criteria | |
✓ should return the user with the correct name (76ms) | |
Queryable Interface | |
Modifiers | |
greaterThan (>) | |
numbers | |
✓ should return records with > key (44ms) | |
strings | |
✓ should return records with > key when searching strings (43ms) | |
greaterThanOrEqual (>=) | |
numbers | |
✓ should return records with >= key | |
strings | |
✓ should return records with >= key when searching strings (51ms) | |
Queryable Interface | |
IN Query Modifier | |
with a record | |
✓ should return correct user (133ms) | |
when given an empty array | |
✓ should return an empty array | |
without a record | |
✓ should return an empty array (81ms) | |
Queryable Interface | |
Modifiers | |
less than (<) | |
numbers | |
✓ should return records with < key | |
less than or equal (<=) | |
numbers | |
✓ should return records with < key | |
Queryable Interface | |
Modifiers | |
like | |
✓ should return the user with the given name (121ms) | |
✓ should support wrapping both sides with a % sign (79ms) | |
Queryable Interface | |
LIMIT Query Modifier | |
✓ should return the correct amount of records | |
✓ as an option should return correct amount of records | |
Queryable Interface | |
Nested Query Modifiers | |
with a record | |
✓ should return the correct users with nested criteria (117ms) | |
✓ should remove unnecessary conjuncts and disjuncts correcty (43ms) | |
Queryable Interface | |
Modifiers | |
not equal (!=) | |
✓ should return records with symbolic usage ! usage (54ms) | |
✓ should return records using not comparisons on strings (85ms) | |
Queryable Interface | |
NOT IN Query Modifier | |
with a record | |
✓ should return correct user (157ms) | |
without a record | |
✓ should return an empty array (123ms) | |
Queryable Interface | |
OR Query Modifier | |
with a record | |
✓ should return the correct users (52ms) | |
✓ should work with multi-level criteria options inside the OR criteria (40ms) | |
✓ should work correctly when OR is used with AND (44ms) | |
✓ should work correctly when OR is used with multiple contains modifiers | |
without a record | |
✓ should return an empty array (50ms) | |
Queryable Interface | |
SELECT Query Modifier | |
✓ should return a record with a single field first_name | |
✓ should return multiples records with a single field first_name | |
✓ should return a record with a single field first_name (findOne) | |
✓ should return a record with multiple fields | |
✓ in absence of SELECT modifier should return a record with all fields | |
Queryable Interface | |
SKIP Query Modifier | |
✓ should return the correct amount of records (44ms) | |
✓ as an option should return correct amount of records (39ms) | |
Queryable Interface | |
SORT Query Modifier | |
✓ should sort records using asc (46ms) | |
✓ should sort records using desc (57ms) | |
✓ should sort when sort is an option | |
✓ should sort records when a column name is used (49ms) | |
Multiple SORT criteria searches | |
✓ should sort records using multiple sort criteria, with first name desc | |
✓ should sort records using multiple sort criteria, with first name asc (47ms) | |
Queryable Interface | |
Modifiers | |
startsWith | |
✓ should return the user with the correct name (67ms) | |
Queryable Interface | |
SUM Query Modifier | |
✓ should sum by key | |
Queryable Interface | |
select() | |
✓ should limit the fields returned but always enforce the primary key | |
✓ should work with the callback style (42ms) | |
✓ should return all the fields when a star is used | |
✓ should normalize select star into an array | |
✓ should error when an ambiguous select is used | |
✓ should return the primary key when an empty select is used | |
omit() | |
✓ should limit the fields returned but always enforce the primary key | |
✓ should work with the callback style | |
✓ should error when an attempt is made to omit the primary key | |
111 passing (11s) | |
1 pending | |
time elapsed: 10924.928ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment