Skip to content
Snippets Groups Projects
Verified Commit fbed2909 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett
Browse files

Removed prepend in favour of clean and appendChild

parent 897d8d54
No related branches found
No related tags found
1 merge request!10564Initial balsamiq support
Loading
Loading
@@ -6,7 +6,8 @@ class Spinner {
}
 
start() {
this.renderable.prepend(this.container);
this.renderable.innerHTML = '';
this.renderable.appendChild(this.container);
}
 
stop() {
Loading
Loading
Loading
Loading
@@ -31,7 +31,7 @@ describe('Spinner', () => {
 
describe('start', () => {
beforeEach(() => {
renderable = jasmine.createSpyObj('renderable', ['prepend']);
renderable = jasmine.createSpyObj('renderable', ['appendChild']);
container = {};
 
spinner = {
Loading
Loading
@@ -42,8 +42,12 @@ describe('Spinner', () => {
Spinner.prototype.start.call(spinner);
});
 
it('should call .prepend', () => {
expect(renderable.prepend).toHaveBeenCalledWith(container);
it('should set .innerHTML to an empty string', () => {
expect(renderable.innerHTML).toEqual('');
});
it('should call .appendChild', () => {
expect(renderable.appendChild).toHaveBeenCalledWith(container);
});
});
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment