test(virtualScroll): fix virtual scroll unit test

This commit is contained in:
Adam Bradley
2016-05-17 07:46:58 -05:00
parent 55ec80a479
commit 8b09733124
2 changed files with 14 additions and 16 deletions

View File

@ -535,7 +535,7 @@ describe('VirtualScroll', () => {
function getView(width?:number, height?: number, top?: number, left?: number): any { function getView(width?:number, height?: number, top?: number, left?: number): any {
return { return {
setLocal: function(){}, context: {},
rootNodes: [{ rootNodes: [{
nodeType: 1, nodeType: 1,
offsetWidth: width, offsetWidth: width,

View File

@ -278,7 +278,6 @@ export function parseTemplate(template: string): string[] {
let words = template.split(' ').filter(w => w.length > 0); let words = template.split(' ').filter(w => w.length > 0);
words.forEach((word, i) => { words.forEach((word, i) => {
if (word.length) {
FORMAT_KEYS.forEach(format => { FORMAT_KEYS.forEach(format => {
if (word === format.f) { if (word === format.f) {
if (word === FORMAT_A || word === FORMAT_a) { if (word === FORMAT_A || word === FORMAT_a) {
@ -294,7 +293,6 @@ export function parseTemplate(template: string): string[] {
formats.push(word); formats.push(word);
} }
}); });
}
}); });
return formats; return formats;