當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript power-assert.strictEqual函數代碼示例

本文整理匯總了TypeScript中power-assert.strictEqual函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript strictEqual函數的具體用法?TypeScript strictEqual怎麽用?TypeScript strictEqual使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了strictEqual函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: done

 .then(() => {
   td.verify(ga('create', captor.capture()), { ignoreExtraArgs: true });
   td.verify(ga('send', 'pageview', captor.capture()));
   assert.strictEqual(captor.values[0], expectedId);
   assert.strictEqual(captor.values[1].page, expectedPath);
   done();
 })
開發者ID:3846masa,項目名稱:SUSH,代碼行數:7,代碼來源:index.spec.ts

示例2: done

 .then(() => {
   for (const key of Object.keys(expectedObj)) {
     const expected = expectedObj[key];
     assert.strictEqual(sush.stock.get(key), expected);
   }
   done();
 })
開發者ID:3846masa,項目名稱:SUSH,代碼行數:7,代碼來源:index.spec.ts

示例3: setTimeout

 setTimeout(() => {
   assert.strictEqual(dispatched.length, 3);
   nodeAssert.deepStrictEqual(dispatched[0], {
     type: WorkerPostEventType.INITIALIZED,
     payload: {
       base: 1,
       test: 1,
       test2: 1,
       test3: 0,
     },
   });
   nodeAssert.deepStrictEqual(dispatched[1], {
     type: WorkerPostEventType.UPDATE,
     payload: {
       base: 2,
       test: 2,
       test2: 1,
       test3: 1,
     },
   });
   nodeAssert.deepStrictEqual(dispatched[2], {
     type: WorkerPostEventType.DISPATCHED,
     payload: { type: 'test', payload: 1 },
   });
   done();
 }, WAIT_TIME_MS);
開發者ID:brn,項目名稱:react-mvi,代碼行數:26,代碼來源:factory.spec.ts

示例4: it

    it('returns lower-case if mode is \'lower\'', () => {
      const expected = 'lowercase';

      const key = 'LOWERCASE';
      stock = new Stock({ mode: 'lower' });
      const actual = (stock as any)._convertKey(key);

      assert.strictEqual(actual, expected);
    });
開發者ID:3846masa,項目名稱:SUSH,代碼行數:9,代碼來源:Stock.spec.ts

示例5: it

 it('should have the same properties as the input', () => {
   assert.strictEqual(twix.config.consumerKey, config.consumerKey);
   assert.strictEqual(twix.config.consumerSecret, config.consumerSecret);
   assert.strictEqual(twix.config.accessToken, config.accessToken);
   assert.strictEqual(twix.config.accessTokenSecret, config.accessTokenSecret);
 });
開發者ID:hashedhyphen,項目名稱:twix,代碼行數:6,代碼來源:test_initialize.ts

示例6: done

 .then(() => {
   assert.strictEqual(sush.stock.get('example'), 'https://example.com');
   assert.strictEqual(sush.stock.get('google'), 'https://google.com');
   done();
 })
開發者ID:3846masa,項目名稱:SUSH,代碼行數:5,代碼來源:index.spec.ts

示例7: it

 it('passes \'default\' as mode to Store if mode is none', () => {
   const expected = 'default';
   const sush = new SUSH();
   const actual = sush.stock.mode;
   assert.strictEqual(actual, expected);
 });
開發者ID:3846masa,項目名稱:SUSH,代碼行數:6,代碼來源:index.spec.ts


注:本文中的power-assert.strictEqual函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。