Fix tests.

This commit is contained in:
gaba
2017-05-05 14:09:00 -07:00
parent cb09c50820
commit d7e72bb138
4 changed files with 32 additions and 40 deletions
+4 -21
View File
@@ -23,27 +23,11 @@ describe('graph.loaders.Metrics', () => {
describe('different comment states', () => {
beforeEach(() =>{
CommentModel.create( {id: '1', body: 'a new comment!'})
.then((comment) => {
console.log('*************** wtf comment', comment);
})
.catch((error) => {
console.log('1 debug the rror create ', error);
});
console.log('debug 1');
CommentModel.create({id: '2', body: 'a new comment!'})
.catch((error) => {
console.log('2 debug the rror create ', error);
});
console.log('debug 2');
beforeEach(() =>[
CommentModel.create( {id: '1', body: 'a new comment!'}),
CommentModel.create({id: '2', body: 'a new comment!'}),
CommentModel.create({id: '3', body: 'a new comment!'})
.catch((error) => {
console.log('3 debug the rror create ', error);
});
console.log('debug 3');
}
);
]);
[
{flagged: 0, actions: []},
@@ -56,7 +40,6 @@ describe('graph.loaders.Metrics', () => {
]}
].forEach(({flagged, actions}) => {
console.log('-----------------> debug forEach');
describe(`with actions=${actions.length}`, () => {
beforeEach(() => ActionModel.create(actions));
+2 -2
View File
@@ -21,7 +21,7 @@ describe('graph.mutations.createComment', () => {
id
status
tags {
name
id
}
}
errors {
@@ -228,7 +228,7 @@ describe('graph.mutations.createComment', () => {
.then(({tags}) => {
if (tag) {
expect(tags).to.have.length(1);
expect(tags[0]).to.have.property('name', tag);
expect(tags[0]).to.have.property('id', tag);
} else {
expect(tags).length(0);
}