Commit a92ee68a authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'himkp-jest-notebook-migrate' into 'master'

Migrate spec/javascripts/notebook/ to Jest

Closes #194245

See merge request gitlab-org/gitlab!31429
parents ea307cd5 8be80a59
...@@ -25,7 +25,7 @@ describe('Code component', () => { ...@@ -25,7 +25,7 @@ describe('Code component', () => {
beforeEach(done => { beforeEach(done => {
vm = setupComponent(json.cells[0]); vm = setupComponent(json.cells[0]);
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
...@@ -39,7 +39,7 @@ describe('Code component', () => { ...@@ -39,7 +39,7 @@ describe('Code component', () => {
beforeEach(done => { beforeEach(done => {
vm = setupComponent(json.cells[2]); vm = setupComponent(json.cells[2]);
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
...@@ -60,7 +60,7 @@ describe('Code component', () => { ...@@ -60,7 +60,7 @@ describe('Code component', () => {
vm = setupComponent(cell); vm = setupComponent(cell);
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
......
...@@ -24,7 +24,7 @@ describe('Markdown component', () => { ...@@ -24,7 +24,7 @@ describe('Markdown component', () => {
}); });
vm.$mount(); vm.$mount();
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
......
...@@ -25,7 +25,7 @@ describe('Output component', () => { ...@@ -25,7 +25,7 @@ describe('Output component', () => {
beforeEach(done => { beforeEach(done => {
createComponent(json.cells[2].outputs[0]); createComponent(json.cells[2].outputs[0]);
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
...@@ -43,7 +43,7 @@ describe('Output component', () => { ...@@ -43,7 +43,7 @@ describe('Output component', () => {
beforeEach(done => { beforeEach(done => {
createComponent(json.cells[3].outputs[0]); createComponent(json.cells[3].outputs[0]);
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
...@@ -73,7 +73,7 @@ describe('Output component', () => { ...@@ -73,7 +73,7 @@ describe('Output component', () => {
beforeEach(done => { beforeEach(done => {
createComponent(json.cells[5].outputs[0]); createComponent(json.cells[5].outputs[0]);
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
...@@ -87,7 +87,7 @@ describe('Output component', () => { ...@@ -87,7 +87,7 @@ describe('Output component', () => {
beforeEach(done => { beforeEach(done => {
createComponent(json.cells[6].outputs[0]); createComponent(json.cells[6].outputs[0]);
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
...@@ -104,7 +104,7 @@ describe('Output component', () => { ...@@ -104,7 +104,7 @@ describe('Output component', () => {
it("renders as plain text when doesn't recognise other types", done => { it("renders as plain text when doesn't recognise other types", done => {
createComponent(json.cells[7].outputs[0]); createComponent(json.cells[7].outputs[0]);
setTimeout(() => { setImmediate(() => {
expect(vm.$el.querySelector('pre')).not.toBeNull(); expect(vm.$el.querySelector('pre')).not.toBeNull();
expect(vm.$el.textContent.trim()).toContain('testing'); expect(vm.$el.textContent.trim()).toContain('testing');
......
...@@ -16,7 +16,7 @@ describe('Prompt component', () => { ...@@ -16,7 +16,7 @@ describe('Prompt component', () => {
}); });
vm.$mount(); vm.$mount();
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
...@@ -40,7 +40,7 @@ describe('Prompt component', () => { ...@@ -40,7 +40,7 @@ describe('Prompt component', () => {
}); });
vm.$mount(); vm.$mount();
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
......
...@@ -22,7 +22,7 @@ describe('Notebook component', () => { ...@@ -22,7 +22,7 @@ describe('Notebook component', () => {
}); });
vm.$mount(); vm.$mount();
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
...@@ -42,7 +42,7 @@ describe('Notebook component', () => { ...@@ -42,7 +42,7 @@ describe('Notebook component', () => {
}); });
vm.$mount(); vm.$mount();
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
...@@ -74,7 +74,7 @@ describe('Notebook component', () => { ...@@ -74,7 +74,7 @@ describe('Notebook component', () => {
}); });
vm.$mount(); vm.$mount();
setTimeout(() => { setImmediate(() => {
done(); done();
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment