refactor: document.all内容移步sdenv项目,删除相关文件

This commit is contained in:
rnet 2024-03-13 03:06:02 +08:00
parent 7f2e38a79e
commit e5b1ad655c
3 changed files with 1 additions and 24 deletions

View File

@ -152,4 +152,4 @@ Examples:
加作者微信进技术交流群: `howduudu_tech`(备注rs-reverse)
**后续开源补环境框架群内第一时间通知**
订阅号会定期发表技术文章:码功

View File

@ -1,23 +0,0 @@
const getDocumentAll = require('@utils/getDocumentAll').getDocumentAll;
describe('模拟document.all检测', () => {
const da = getDocumentAll({ length: 1 });
console.log(
'运行getDocumentAll({ length: 1 }),返回:', da,
'\n运行getDocumentAll({ length: 1 }) == undefined返回', da == undefined,
'\n运行getDocumentAll({ length: 1 })(),返回:', da(),
'\n运行typeof getDocumentAll({ length: 1 }),返回:', typeof da,
);
test('getDocumentAll({ length: 1 }).length === 1', () => {
expect(da.length).toBe(1);
});
test('getDocumentAll({ length: 1 }) == undefined', () => {
expect(da == undefined).toBe(true);
});
test('typeof getDocumentAll({ length: 1 })', () => {
expect(typeof da).toBe('undefined');
});
test('getDocumentAll({ length: 1 })() === null', () => {
expect(da()).toBe(null);
});
});

Binary file not shown.