MCPcopy Create free account
hub / github.com/dresende/node-orm2 / setup

Function setup

test/integration/predefined-validators.js:36–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 var Person = null;
35
36 var setup = function () {
37 return function (done) {
38 Person = db.define("person", {
39 name : String,
40 surname : String
41 }, {
42 validations: {
43 surname: validators.unique()
44 }
45 });
46
47 Person.settings.set("instance.returnAllErrors", false);
48
49 return helper.dropSync(Person, function () {
50 Person.create([{
51 name : "John",
52 surname : "Doe"
53 }], done);
54 });
55 };
56 };
57
58 before(function (done) {
59 helper.connect(function (connection) {

Callers 1

Calls 2

createMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected