当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript assert.notInclude方法代码示例

本文整理汇总了TypeScript中chai.assert.notInclude方法的典型用法代码示例。如果您正苦于以下问题:TypeScript assert.notInclude方法的具体用法?TypeScript assert.notInclude怎么用?TypeScript assert.notInclude使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在chai.assert的用法示例。


在下文中一共展示了assert.notInclude方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: test

 test('compiles ES2017 to ES2015', async () => {
   const result = jsTransform(
       'async function test() { await 0; }', {compile: 'es2015'});
   assert.include(result, 'asyncToGenerator');
   assert.notInclude(result, 'async function test');
   assert.notInclude(result, 'regeneratorRuntime');
 });
开发者ID:MehdiRaash,项目名称:tools,代码行数:7,代码来源:js-transform_test.ts

示例2: test

 test('compiles ES2017 to ES2015', async () => {
   const sourceStream = createFakeFileStream([
     {
       path: 'foo.js',
       contents: `async function test() { await 0; }`,
     },
   ]);
   const op = pipeStreams(
       [sourceStream, getOptimizeStreams({js: {compile: 'es2015'}})]);
   const result = await getOnlyFile(op);
   assert.include(result, 'asyncToGenerator');
   assert.notInclude(result, 'async function test');
   assert.notInclude(result, 'regeneratorRuntime');
 });
开发者ID:Polymer,项目名称:tools,代码行数:14,代码来源:optimize-streams_test.ts

示例3: done

 .on('end', () => {
   const expectedJoinedFiles = [
     'index.html',
     'shell.html',
     path.join('source-dir', 'my-app.html'),
   ];
   assert.deepEqual(
       Array.from(joinedFiles.keys()).sort(), expectedJoinedFiles);
   const shell = joinedFiles.get('shell.html').contents.toString();
   assert.notInclude(shell, '<html', 'html element was added');
   assert.notInclude(shell, '<head', 'head element was added');
   assert.notInclude(shell, '<body', 'body element was added');
   done();
 });
开发者ID:chrisekelley,项目名称:polymer-build,代码行数:14,代码来源:html-splitter_test.ts

示例4: test

 test('creates a filesystem path using the platform separators', () => {
   const otherSeparator = pathSeparator === '/' ? '\\' : '/';
   const path =
       pathFromUrl(RootPath, '/some/url/pathname' as PackageRelativeUrl);
   assert.include(path, pathSeparator);
   assert.notInclude(path, otherSeparator);
 });
开发者ID:MehdiRaash,项目名称:tools,代码行数:7,代码来源:path-transformers_test.ts

示例5: test

    test('add prefetch links for transitive deps of bundled', async () => {
      const project = new PolymerProject({
        root: 'test-fixtures/bundle-project/',
        entrypoint: 'index.html',
        fragments: ['simple-import.html'],
      });

      const files = await emittedFiles(
          mergeStream(project.sources(), project.dependencies())
              .pipe(project.bundler({inlineScripts: false}))
              .pipe(project.addPrefetchLinks()),
          project.config.root);
      const expectedFiles =
          ['index.html', 'simple-import.html', 'simple-script.js'];
      assert.deepEqual(expectedFiles, [...files.keys()].sort());

      const html = files.get('index.html')!.contents!.toString();

      // `simple-import.html` is a direct dependency, so we should not add
      // prefetch link to it.
      assert.notInclude(
          html, '<link rel="prefetch" href="/simple-import.html">');

      // `simple-import.html` has inlined `simple-import-2.html` which has an
      // external script import `simple-script.js`.  A prefetch link is added
      // for `simple-script.js` because it is a transitive dependency of the
      // `index.html`
      assert.include(html, '<link rel="prefetch" href="/simple-script.js">');
    });
开发者ID:MehdiRaash,项目名称:tools,代码行数:29,代码来源:prefetch-links_test.ts

示例6: test

    test('adds prefetch links for transitive deps of unbundled', async () => {

      const project = new PolymerProject({
        root: 'test-fixtures/bundle-project/',
        entrypoint: 'index.html',
      });

      const files = await emittedFiles(
          mergeStream(project.sources(), project.dependencies())
              .pipe(project.addPrefetchLinks()),
          project.config.root);

      const html = files.get('index.html').contents.toString();

      // No prefetch links needed for direct dependency.
      assert.notInclude(
          html, '<link rel="prefetch" href="/simple-import.html">');

      // Prefetch added for the transitive dependencies of `index.html`,
      // which are all direct dependencies of `simple-import.html`.
      assert.include(html, '<link rel="prefetch" href="/simple-script.js">');
      assert.include(html, '<link rel="prefetch" href="/simple-style.css">');
      assert.include(
          html, '<link rel="prefetch" href="/simple-import-2.html">');
    });
开发者ID:chrisekelley,项目名称:polymer-build,代码行数:25,代码来源:prefetch-links_test.ts

示例7: it

 it("doesn't warn if non-existent file is excluded by --exclude", async () => {
     const result = await execRunnerWithOutput({
         exclude: ["**/*.js"],
         files: ["foo/bar.js"],
     });
     assert.strictEqual(result.status, Status.Ok, "process should exit without error");
     assert.notInclude(result.stderr, "does not exist");
 });
开发者ID:abierbaum,项目名称:tslint,代码行数:8,代码来源:executableTests.ts

示例8: done

        .on('end', () => {
          const expectedFiles = [
            'index.html',
            'shell.html',
          ];
          assert.deepEqual(Array.from(files.keys()).sort(), expectedFiles);

          const index = files.get('index.html').contents.toString();
          assert.include(index, 'index stuff');
          assert.include(index, '<base href="/newBase/">');
          assert.notInclude(index, 'oldBase');

          const shell = files.get('shell.html').contents.toString();
          assert.include(shell, 'shell stuff');
          assert.include(shell, 'shell-stuff/');
          assert.notInclude(shell, 'newBase');
          done();
        });
开发者ID:MehdiRaash,项目名称:tools,代码行数:18,代码来源:update-base-tag_test.ts


注:本文中的chai.assert.notInclude方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。