Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ide/lib/common/model_spec.js')
-rw-r--r--spec/frontend/ide/lib/common/model_spec.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/frontend/ide/lib/common/model_spec.js b/spec/frontend/ide/lib/common/model_spec.js
index 51df1e2e42f..5d1623429c0 100644
--- a/spec/frontend/ide/lib/common/model_spec.js
+++ b/spec/frontend/ide/lib/common/model_spec.js
@@ -81,16 +81,13 @@ describe('Multi-file editor library model', () => {
});
describe('onChange', () => {
- it('calls callback on change', (done) => {
+ it('calls callback on change', () => {
const spy = jest.fn();
model.onChange(spy);
model.getModel().setValue('123');
- setImmediate(() => {
- expect(spy).toHaveBeenCalledWith(model, expect.anything());
- done();
- });
+ expect(spy).toHaveBeenCalledWith(model, expect.anything());
});
});