added specs
This commit is contained in:
parent
cc0663140f
commit
96785e7713
2 changed files with 20 additions and 0 deletions
|
@ -28,6 +28,10 @@ describe('Multi-file editor library model', () => {
|
|||
expect(model.originalModel).not.toBeNull();
|
||||
expect(model.model).not.toBeNull();
|
||||
expect(model.baseModel).not.toBeNull();
|
||||
|
||||
expect(model.originalModel.uri.path).toBe('original/path--path');
|
||||
expect(model.model.uri.path).toBe('path--path');
|
||||
expect(model.baseModel.uri.path).toBe('target/path--path');
|
||||
});
|
||||
|
||||
it('creates model with head file to compare against', () => {
|
||||
|
|
|
@ -569,6 +569,22 @@ describe('IDE store file actions', () => {
|
|||
.catch(done.fail);
|
||||
});
|
||||
|
||||
it('returns false when already opened', done => {
|
||||
store.state.openFiles.push({
|
||||
...f,
|
||||
active: true,
|
||||
key: `pending-${f.key}`,
|
||||
});
|
||||
|
||||
store
|
||||
.dispatch('openPendingTab', { file: f, keyPrefix: 'pending' })
|
||||
.then(added => {
|
||||
expect(added).toBe(false);
|
||||
})
|
||||
.then(done)
|
||||
.catch(done.fail);
|
||||
});
|
||||
|
||||
it('pushes router URL when added', done => {
|
||||
store.state.currentBranchId = 'master';
|
||||
|
||||
|
|
Loading…
Reference in a new issue