How to use the assetgraph/lib/TransformQueue.prototype function in assetgraph

To help you get started, we’ve selected a few assetgraph examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github assetgraph / assetgraph-builder / test / transforms / buildProduction.js View on Github external
it('should call splitCssIfIeLimitIsReached unconditionally and correctly when IE >= 8 is to be supported', async function() {
    const stub = sinon
      .stub(
        require('assetgraph/lib/TransformQueue').prototype,
        'splitCssIfIeLimitIsReached'
      )
      .returnsThis();
    const assetGraph = new AssetGraph();
    await assetGraph.loadAssets({
      url: 'http://example.com/index.html',
      type: 'Html',
      text: ''
    });
    try {
      await assetGraph.buildProduction({ version: false, browsers: 'ie >= 8' });

      expect(stub, 'to have calls satisfying', function() {
        stub({ type: 'Css' }, { minimumIeVersion: 8 });
      });
    } finally {

assetgraph

An auto discovery dependency graph based optimization framework for web pages and applications

BSD-3-Clause
Latest version published 7 months ago

Package Health Score

59 / 100
Full package analysis

Similar packages