mirror of
https://github.com/wassname/talk.git
synced 2026-07-10 10:29:18 +08:00
Fix tests.
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user