Created
May 11, 2018 19:47
-
-
Save ChrisMoney/c4a1259040b34f3613a28e16d502076e to your computer and use it in GitHub Desktop.
Angular Unit Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FileDropUploadComponent } from './file-drop-upload.component'; | |
describe('FileDropUploadComponent', () => { | |
let component: FileDropUploadComponent; | |
beforeEach(() => { | |
component = new FileDropUploadComponent(); | |
}); | |
it('should create', () => { | |
expect(component).toBeTruthy(); | |
}); | |
it('should emit messages when uploading files from drop', (done) => { | |
const documentKey = 'documentKeyTest'; | |
component.documentUploaded.subscribe(g => { | |
expect(g).toEqual(documentKey); | |
done(); | |
}); | |
component.uploadFilesFromDrop(documentKey); | |
}); | |
it('should emit messages when uploading files from dialog', (done) => { | |
const documentKey = 'documentKeyTest'; | |
component.documentUploaded.subscribe(g => { | |
expect(g).toEqual(documentKey); | |
done(); | |
}); | |
component.uploadFilesFromDialog(documentKey); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment