beanbagdb 0.5.51 → 0.5.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -159,7 +159,7 @@ export const system_schemas = {
159
159
  encrypted_fields:[],
160
160
  single_record:false
161
161
  },
162
- },
162
+ }
163
163
  };
164
164
 
165
165
  // this is not stored in the DB. only for validating the metadata during doc update
@@ -316,7 +316,7 @@ describe("Schema doc insertion gives errors when", async () => {
316
316
  it(`${element[0]}`, async () => {
317
317
  await rejects(
318
318
  async () => {
319
- await database.insert("schema", element[1]);
319
+ await database.create("schema", element[1]);
320
320
  },
321
321
  ValidationError
322
322
  );
package/test/test1.js CHANGED
@@ -164,23 +164,14 @@ import {BeanBagDB} from '../src/index.js';
164
164
 
165
165
  let schema_docs_invalid = [
166
166
  {
167
- name: "contact",
168
- description: "This can be left blank",
169
- schema: {
170
- "type":"object",
171
- "properties":{"name":{"type":"string"},"address":{type:"object"},"secret":{"type":"string"}},
172
- "additionalProperties":true
173
- },
174
- settings: {
175
- primary_keys:["name"],
176
- non_editable_fields:["address"],
177
- single_record:false,
178
- encrypted_fields:["name"]
179
- },
167
+ name: "",
168
+ description: "",
169
+ schema: {},
170
+ settings: {},
180
171
  }
181
172
  ]
182
173
  let doc_obj = get_pdb_doc("test_database_26","qwertyuiopaqwsde1254")
183
174
  let database = new BeanBagDB(doc_obj);
184
175
  await database.ready()
185
- let a = await database.insert("schema",schema_docs_invalid[0])
176
+ let a = await database.create("schema",schema_docs_invalid[0])
186
177
  })()
File without changes