Skip to content

Commit d3f0a9a

Browse files
committed
Executa sync no teste
1 parent 5311f0b commit d3f0a9a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

build/modules/User/integration.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ var helpers_1 = require("../../config/tests/config/helpers");
33
var jwt = require("jwt-simple");
44
var HTTPStatus = require("http-status");
55
var model = require('../../models');
6+
model.sequelize.sync().then(function () { });
67
describe('## User Tests', function () {
78
'use strict';
8-
model.sequelize.sync().then(function () { });
99
var config = require('../../config/env/config')();
1010
var id;
1111
var token;
@@ -15,7 +15,7 @@ describe('## User Tests', function () {
1515
email: 'test@mail.com',
1616
password: 'testPassword'
1717
};
18-
beforeEach(function (done) {
18+
before(function (done) {
1919
model
2020
.User
2121
.destroy({

server/modules/User/integration.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import * as _ from 'lodash';
44
import * as HTTPStatus from 'http-status';
55
var model = require('../../models');
66

7+
model.sequelize.sync().then(() => {});
78

89
describe('## User Tests', () => {
910
'use strict';
10-
model.sequelize.sync().then(() => {});
1111
const config = require('../../config/env/config')();
1212

1313
let id;
@@ -20,7 +20,7 @@ var model = require('../../models');
2020
password: 'testPassword'
2121
};
2222

23-
beforeEach((done) => {
23+
before((done) => {
2424
model
2525
.User
2626
.destroy({

0 commit comments

Comments
 (0)