๋ฒ๊ทธ ์ค๋ช
deno๋ก ํ
์คํธํ ๋ Make sure to await all promises returned from Deno APIs before finishing test case.
๋ณต์ : https://github.com/denoland/deno/issues/6138
์ฌํํ๊ธฐ ์ํด
// a.ts
import 'https://jspm.dev/npm:sinon<strong i="13">@9</strong>';
Deno.test('1', async () => {});
$deno test ./a.ts
์ปจํ ์คํธ(๋ค์ ์ ๋ณด๋ฅผ ์์ฑํ์ญ์์ค):
Deno๋ฅผ ์ง์ํ ์ ์ด ์์ต๋๋ค. ํ ๋ฆฌํ์คํธ๋ฅผ ํตํด ์ด๋ฅผ ๊ฐ์ ํ๊ณ ์ถ์ต๋๊น?
์ด ๋ฌธ์ ๋ ๋ฌธ์ ๊ฐ ์๋๋ฉฐ ํผ๋๋ฐฑ์ด ์์ ๋์ง ์์์ผ๋ฏ๋ก ์ข ๋ฃํฉ๋๋ค.
๋ ๋ฅ๋ ฅ์ด ์์ด. ํ์ง๋ง sinon์ ์ ์ฉํ ๋๊ตฌ๋ฅผ ๋ง๋๋ ๊ทธ๋ฃน์ ๋ํด ๋๋จํ ๊ฐ์ฌํฉ๋๋ค ๐
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋ ๋ฅ๋ ฅ์ด ์์ด. ํ์ง๋ง sinon์ ์ ์ฉํ ๋๊ตฌ๋ฅผ ๋ง๋๋ ๊ทธ๋ฃน์ ๋ํด ๋๋จํ ๊ฐ์ฌํฉ๋๋ค ๐