<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          jsUnityJavaScript 測試框架

          聯(lián)合創(chuàng)作 · 2023-10-01 16:14

          jsUnity 是一個輕量級的上下文無關(guān)的 JavaScript 測試框架,本身并不依賴瀏覽器的功能,可以對 JavaScript、JScript、ECMAScript 進(jìn)行測試。

          示例代碼:

          function sampleTestSuite() {
          	function setUp() {
          		jsUnity.log("set up");
          	}
          
          	function tearDown() {
          		jsUnity.log("tear down");
          	}
          
          	function testLessThan() {
          		assertTrue(1 < 2);
          	}
          	
          	function testPi() {
          		assertEquals(Math.PI, 22 / 7);
          	}
          }
          
          // optionally wire the log function to write to the context
          jsUnity.log = function (s) { document.write(s + "
          "); };
          // expose the default assertion functions to the current scope
          jsUnity.attachAssertions();
          var results = jsUnity.run(sampleTestSuite);
          // if result is not false,
          // access results.total, results.passed, results.failed
          
          瀏覽 16
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評論
          圖片
          表情
          推薦
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  蜜桃视频成人 免费 | 国产卡一卡二高清无码在线 | 精品成人免费视频 | 欧美操操操操操操 | 免费日韩在线三级黄色电影网址 |