From cd6aa59dcdb84d66dd0ec6a6814c2f31b919d741 Mon Sep 17 00:00:00 2001 From: xiaran01 Date: Wed, 13 Mar 2024 10:03:23 +0800 Subject: [PATCH] fix: del console.log --- .../promise_all_race/__test__/index.spec.js | 6 +++--- test.js | 17 ----------------- 2 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 test.js diff --git a/01-material/promise_all_race/__test__/index.spec.js b/01-material/promise_all_race/__test__/index.spec.js index aeefc4f..d324b8d 100644 --- a/01-material/promise_all_race/__test__/index.spec.js +++ b/01-material/promise_all_race/__test__/index.spec.js @@ -15,10 +15,10 @@ const p2 = new Promise((resolve, reject) => { it('Promise.all全部返回成功测试', (done) => { Promise.all([p1, p2, 3, 4, 5]).then(data => { console.log('resolve: ', data); - expect(data).toEqual([ '1', '2', 3, 4, 5 ]); + expect(data).toEqual(['1', '2', 3, 4, 5]); done(); }, err => { - console.log('reject: ', err); + // console.log('reject: ', err); }); }); @@ -30,7 +30,7 @@ const p3 = new Promise((resolve, reject) => { it('Promise.all其中一个返回失败测试', (done) => { Promise.all([p1, p2, p3, 3, 4]).then(data => { - console.log('resolve:', data); + // console.log('resolve:', data); }, err => { expect(err).toBe('fail'); done(); diff --git a/test.js b/test.js deleted file mode 100644 index 96fc25d..0000000 --- a/test.js +++ /dev/null @@ -1,17 +0,0 @@ -const tree = {}; -let p = tree -for (let i = 1; i < 10 + 1; i++) { - if (!p.v) { - p.v = i - } else if (!p.l) { - p.l = { v: i } - } else if (!p.r) { - p.r = { v: i } - } else { - p.l.l = { v: i } - p = p.l - // p = p.l - // p.v = i - } -} -console.log(JSON.stringify(tree, '', 4)) \ No newline at end of file