Skip to content

TypeError on setup -- Is this library still supported? #3

@Shockolate

Description

@Shockolate

Hi,
I am getting the following error when setting up the Seriate.Mock with Seriate.
I'm running NodeJS v4.3.2. Seriate version 0.7.0

$ mocha
path\to\project\node_modules\seriate.mock\src\mock.js:86
                var _executeSql = origContext.prototype.executeSql;
                                             ^

TypeError: Cannot read property 'prototype' of undefined
    at Object.module.exports.patchSqlContext (path\to\project\node_modules\seriate.mock\src\mock.js:86:32)
    at Object.module.exports.setup (path\to\project\node_modules\seriate.mock\src\mock.js:61:8)
    at seriateMock (path\to\project\node_modules\seriate.mock\src\index.js:4:7)
    at Object.<anonymous> (path\to\project\test\PersistenceTests.js:13:1)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    etc....

with my simple unimplemented test file:

// TESTS persistence.js
'use strict';
const chai = require('chai');
const dirtyChai = require('dirty-chai');
const expect = chai.expect;
chai.use(dirtyChai);
const sinon = require('sinon');
const persist = require('../src/Persistence');
const configLoader = require('../src/configLoader');
const sql = require('seriate');
const mock = require('seriate.mock');
mock(sql);

describe('Persistence Library', () => {
  describe('Add New Entity', () => {
    it('should return successfully with valid args and no collisions.');
     // etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions