我正在使用Angular js 1.6并具有
功能setHeightForTable() {
this.$timeout(() => {
const height = document.querySelector('#left-graph').offsetHeight;
const newHeight = height - 78;
angular
.element(document.querySelector('#evalTable table-content'))
.css('max-height', `${newHeight}px`);
});
}
我想测试一下这是我的测试用例----
describe('setHeightForTable()', () => {
it('should set Height For Table', () => {
document.querySelector('#left-graph').offsetHeight = 500
$ctrl.setHeightForTable();
timeout.flush();
});
});
但我收到以下错误---