@knorm/knorm
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -0,1 +1,8 @@ | ||
## [2.1.4](https://github.com/knorm/knorm/compare/v2.1.3...v2.1.4) (2019-09-07) | ||
### Bug Fixes | ||
* **deps:** update dependency lodash to v4.17.13 [security] ([2d283f5](https://github.com/knorm/knorm/commit/2d283f5)) | ||
## [2.1.3](https://github.com/knorm/knorm/compare/v2.1.2...v2.1.3) (2019-03-27) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@knorm/knorm", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "A JavaScript ORM written using ES6 classes", | ||
@@ -25,20 +25,20 @@ "main": "index.js", | ||
"@semantic-release/npm": "5.1.4", | ||
"coveralls": "3.0.3", | ||
"eslint": "5.15.2", | ||
"coveralls": "3.0.6", | ||
"eslint": "5.16.0", | ||
"eslint-config-ganintegrity": "3.1.4", | ||
"jsdoc-to-markdown": "4.0.1", | ||
"jsdoc-to-markdown": "5.0.1", | ||
"knex": "0.15.2", | ||
"mocha": "6.0.2", | ||
"mocha": "6.2.0", | ||
"npm-run-all": "4.1.5", | ||
"nyc": "13.3.0", | ||
"pg": "7.9.0", | ||
"prettier": "1.16.4", | ||
"proxyquire": "2.1.0", | ||
"nyc": "14.1.1", | ||
"pg": "7.12.1", | ||
"prettier": "1.17.0", | ||
"proxyquire": "2.1.3", | ||
"semantic-release": "15.13.3", | ||
"sinon": "7.2.7", | ||
"sinon": "7.4.2", | ||
"sql-bricks-postgres": "0.5.0", | ||
"unexpected": "11.2.0", | ||
"unexpected": "11.8.0", | ||
"unexpected-knex": "2.0.0", | ||
"unexpected-sinon": "10.11.1", | ||
"vuepress": "0.14.10" | ||
"unexpected-sinon": "10.11.2", | ||
"vuepress": "0.14.11" | ||
}, | ||
@@ -45,0 +45,0 @@ "directories": { |
@@ -11,2 +11,3 @@ const Knorm = require('../lib/Knorm'); | ||
describe('Transaction', () => { | ||
let knorm; | ||
let Model; | ||
@@ -19,3 +20,3 @@ let Query; | ||
before(() => { | ||
const knorm = new Knorm(); | ||
knorm = new Knorm(); | ||
@@ -59,2 +60,33 @@ Model = knorm.Model; | ||
it('creates scoped models for models added at runtime', () => { | ||
class Student extends User {} | ||
knorm.addModel(Student); | ||
const transaction = new Transaction(); | ||
const TransactionStudent = transaction.models.Student; | ||
expect(TransactionStudent.name, 'to be', 'Student'); | ||
expect(TransactionStudent.prototype, 'to be a', Student); | ||
expect(TransactionStudent.models.Student, 'to be', TransactionStudent); | ||
expect( | ||
TransactionStudent.prototype.models.Student, | ||
'to be', | ||
TransactionStudent | ||
); | ||
expect(TransactionStudent.Query.prototype, 'to be a', Query); | ||
expect( | ||
TransactionStudent.Query.models.Student.prototype, | ||
'to be a', | ||
Student | ||
); | ||
expect( | ||
TransactionStudent.Query.prototype.models.Student.prototype, | ||
'to be a', | ||
Student | ||
); | ||
}); | ||
it('adds an accessor to the transaction instance', () => { | ||
@@ -61,0 +93,0 @@ const transaction = new Transaction(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
677507
13856