-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #834 from sliceofbytes/update-angular
Update to Angular 8 and fix build scripts
- Loading branch information
Showing
47 changed files
with
858 additions
and
846 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,8 @@ Thumbs.db | |
|
||
# Folder config file | ||
Desktop.ini | ||
.angulardoc.json | ||
|
||
|
||
# VS Code | ||
.vscode |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,45 @@ | ||
import {VgBuffering} from "./vg-buffering"; | ||
import {VgAPI} from "../core/services/vg-api"; | ||
import {IPlayable} from "../core/vg-media/i-playable"; | ||
import {ElementRef} from "@angular/core"; | ||
import { VgStates } from "../core/states/vg-states"; | ||
import { VgBuffering } from './vg-buffering'; | ||
import { VgAPI } from '../core/services/vg-api'; | ||
import { ElementRef } from '@angular/core'; | ||
|
||
describe('Buffering', () => { | ||
let vgBuffering:VgBuffering; | ||
let ref:ElementRef; | ||
let api:VgAPI; | ||
let vgBuffering: VgBuffering; | ||
let ref: ElementRef; | ||
let api: VgAPI; | ||
|
||
beforeEach(() => { | ||
ref = { | ||
nativeElement: { | ||
getAttribute: (name) => { | ||
return name; | ||
} | ||
} | ||
}; | ||
beforeEach(() => { | ||
ref = { | ||
nativeElement: { | ||
getAttribute: (name) => { | ||
return name; | ||
} | ||
} | ||
}; | ||
|
||
api = new VgAPI(); | ||
vgBuffering = new VgBuffering(ref, api); | ||
}); | ||
api = new VgAPI(); | ||
vgBuffering = new VgBuffering(ref, api); | ||
}); | ||
|
||
describe('onPlayerReady', ()=>{ | ||
it('should subscribe to bufferDetected media events', ()=>{ | ||
spyOn(api, 'getMediaById').and.returnValue({ | ||
subscriptions: { | ||
bufferDetected: {subscribe: jasmine.createSpy('bufferDetected') } | ||
} | ||
}); | ||
vgBuffering.onPlayerReady(); | ||
expect(vgBuffering.target.subscriptions.bufferDetected.subscribe).toHaveBeenCalled(); | ||
}); | ||
describe('onPlayerReady', () => { | ||
it('should subscribe to bufferDetected media events', () => { | ||
spyOn(api, 'getMediaById').and.returnValue(<any>{ | ||
subscriptions: { | ||
bufferDetected: { subscribe: jasmine.createSpy('bufferDetected') } | ||
} | ||
}); | ||
vgBuffering.onPlayerReady(); | ||
expect(vgBuffering.target.subscriptions.bufferDetected.subscribe).toHaveBeenCalled(); | ||
}); | ||
}); | ||
|
||
describe('isBuffering', ()=> { | ||
it('should show if buffer is detected', () => { | ||
vgBuffering.onUpdateBuffer(true); | ||
expect(vgBuffering.isBuffering).toBe(true); | ||
}); | ||
it('should hide if buffer is not detected', () => { | ||
vgBuffering.onUpdateBuffer(false); | ||
expect(vgBuffering.isBuffering).toBe(false); | ||
}); | ||
describe('isBuffering', () => { | ||
it('should show if buffer is detected', () => { | ||
vgBuffering.onUpdateBuffer(true); | ||
expect(vgBuffering.isBuffering).toBe(true); | ||
}); | ||
it('should hide if buffer is not detected', () => { | ||
vgBuffering.onUpdateBuffer(false); | ||
expect(vgBuffering.isBuffering).toBe(false); | ||
}); | ||
}); | ||
}); |
This file contains 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
This file contains 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
Oops, something went wrong.