Socket
Socket
Sign inDemoInstall

final-orm

Package Overview
Dependencies
104
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

26

index.test.js

@@ -25,2 +25,3 @@ import dotenv from 'dotenv'

name: { $type: String, index: true, unique: true },
email: { $type: String, index: true, unique: true },
profile: {

@@ -47,6 +48,14 @@ vegan: { $type: Boolean, optional: true }

test('create new user model instance', async () => {
const newUser = await User.add({ name: username })
const getEmail = () => `test${randomBytes(2).toString('HEX')}@tinyrama.com`
const newUser = await User.add({
name: username,
email: getEmail()
})
let newUsers = new Array(10)
newUsers.fill(await User.add({ name: `username-${randomBytes(2).toString('HEX')}` }))
newUsers.fill(await User.add({
name: `username-${randomBytes(2).toString('HEX')}`,
email: getEmail()
}))

@@ -225,2 +234,13 @@ newUsers = await Promise.all(newUsers)

test('query with $with', async () => {
const posts = await User.findAndCount({
$with: 'User',
where: { name: username }
})
console.log('posts.data[0]', posts.data[0])
expect(posts.data[0].name).toBe(username)
})
// test('connect without localhost', async () => {

@@ -288,1 +308,3 @@ // /*

})

@@ -42,2 +42,8 @@ import arangojs, { Database, aql } from 'arangojs'

try {
await db.createDatabase(dbName)
} catch (e) {
// throw new Error(get(e, 'response.body.errorMessage', e))
}
db.useDatabase(dbName)

@@ -56,2 +62,9 @@

const db = await this._getDatabase()
try {
await collection.create()
await this._setIndexes(collection)
} catch (e) {
}
const collection = await db.collection(this.name)

@@ -58,0 +71,0 @@

4

package.json
{
"name": "final-orm",
"version": "1.0.4",
"version": "1.0.5",
"repository": {

@@ -50,3 +50,3 @@ "type": "git",

"arangojs": "^5.7.0",
"arangolize": "^0.9.8",
"arangolize": "0.10.2",
"core-decorators": "^0.20.0",

@@ -53,0 +53,0 @@ "dotenv": "^4.0.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc