diff --git a/.eslintrc.js b/.eslintrc.js index 23fabce..deee49d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,33 +1,22 @@ module.exports = { root: true, parserOptions: { - ecmaVersion: 2018, + ecmaVersion: 2020, }, - plugins: [ - 'node' - ], - extends: [ - 'eslint:recommended', - 'plugin:node/recommended' - ], + plugins: ['node'], + extends: ['eslint:recommended', 'plugin:node/recommended'], env: { - node: true - }, - rules: { + node: true, }, + rules: {}, overrides: [ // mocha tests { - files: [ - 'node-tests/**/*.js' - ], - plugins: [ - 'chai-expect', - 'mocha', - ], + files: ['node-tests/**/*.js'], + plugins: ['chai-expect', 'mocha'], env: { - mocha: true + mocha: true, }, - } - ] + }, + ], }; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03516b4..6cb198e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ concurrency: jobs: lint: - name: "Lint" + name: 'Lint' runs-on: ubuntu-latest timeout-minutes: 10 @@ -29,8 +29,8 @@ jobs: - name: Lint run: yarn lint - test: - name: "Test" + test_classic: + name: 'Test Ember CLI + ember-auto-import' runs-on: ubuntu-latest timeout-minutes: 10 @@ -45,3 +45,24 @@ jobs: run: yarn install --frozen-lockfile - name: Run Tests run: yarn test + + test_embroider: + name: 'Test Embroider' + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v3 + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: yarn + - name: Install Dependencies + run: yarn install --frozen-lockfile + - name: Install Embroider + run: yarn add -D @embroider/core @embroider/compat @embroider/webpack + - name: Run Tests + run: yarn test + env: + EMBROIDER_TEST_SETUP_OPTIONS: optimized diff --git a/README.md b/README.md index d52c0ea..a256754 100644 --- a/README.md +++ b/README.md @@ -4,68 +4,199 @@ [![Ember Observer Score](https://emberobserver.com/badges/ember-cli-bundle-analyzer.svg)](https://emberobserver.com/addons/ember-cli-bundle-analyzer) [![npm version](https://badge.fury.io/js/ember-cli-bundle-analyzer.svg)](https://badge.fury.io/js/ember-cli-bundle-analyzer) -An Ember CLI addon to analyze the size and contents of your app's bundled output, -using an interactive zoomable treemap. +An Ember CLI addon to analyze the size and contents of your app's bundled output, using an interactive zoomable treemap. -View the [interactive Demo](https://cdn.rawgit.com/simonihmig/ember-cli-bundle-analyzer/bceb55a7/docs/demo.html) +View the [interactive Demo](https://raw.githack.com/simonihmig/ember-cli-bundle-analyzer/master/docs/demo.html) ![Screenshot of analyzer output](docs/screen.png) This helps you to -* analyze which individual modules make it into your final bundle -* find out how big each contained module is, including the raw source, minified and gzipped sizes -* find modules that got there by mistake -* optimize your bundle size +- analyze which individual modules make it into your final bundle +- find out how big each contained module is +- find modules that got there by mistake +- optimize your bundle size +It uses [source-map-explorer](https://github.com/danvk/source-map-explorer) under the hood, +and wraps it in an Ember CLI addon to make it easy to use. -It uses [broccoli-concat-analyser](https://github.com/stefanpenner/broccoli-concat-analyser) under the hood, -which in turn was inspired by -[webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer), -and wraps it in Ember CLI addon to make it easy to use. - -It uses [broccoli-concat-analyser](https://github.com/stefanpenner/broccoli-concat-analyser) under the hood, -which in turn was inspired by -[webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer), -and wraps it in Ember CLI addon to make it easy to use. +Given that it works based on source maps, it is agnostic to the actual bundling tool used, be it pure Ember CLI (which is based on `broccoli-concat`), Ember CLI with ember-auto-import (which makes it a mix of `broccoli-concat` and `webpack`) or even Embroider. +The only condition is that _proper_ source maps are generated. ## Compatibility -* Ember CLI v3.28 or above -* Node.js v16 or above +- Ember CLI v3.28 or above +- Node.js v16 or above +- works with ember-auto-import and Embroider, as long as source maps are properly enabled + +## Quick Start + +To get you going _quickly_, follow these steps: + +1. Install the addon: + + ``` + ember install ember-cli-bundle-analyzer + ``` + +2. Setup your `ember-cli-build.js`: + + ```diff + const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +const { + + createEmberCLIConfig, + +} = require('ember-cli-bundle-analyzer/create-config'); + + module.exports = function (defaults) { + const app = new EmberApp(defaults, { + // your other options are here + // ... + + ...createEmberCLIConfig(), + }); + + return app.toTree(); + }; + ``` + +3. Launch your local server in analyze-mode: + + ```sh + ENABLE_BUNDLE_ANALYZER=true ember serve --prod + ``` + +4. Open [http://localhost:4200/\_analyze](http://localhost:4200/_analyze) + +For more detailed instructions, read the following chapters... + +## Setup + +Two things need to be in place for this addon to work correctly: it needs to have a [config](#Config) that at least enables it, and _proper_ [source maps](#source-maps) need to be enabled for the EmberCLI build pipeline. + +While it is possible to provide these settings manually, the addon provides some recommended presets that you can apply using `createEmberCLIConfig`: + +```js +// ember-cli-build.js +const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { + createEmberCLIConfig, +} = require('ember-cli-bundle-analyzer/create-config'); +module.exports = function (defaults) { + const app = new EmberApp(defaults, { + // your other options are here + // ... + ...createEmberCLIConfig(), + }); -## Installation + return app.toTree(); +}; +``` +If you are using Embroider, then this should cover you: + +```js +// ember-cli-build.js +const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { + createEmberCLIConfig, + createWebpackConfig, +} = require('ember-cli-bundle-analyzer/create-config'); + +module.exports = function (defaults) { + const app = new EmberApp(defaults, { + // your other options are here + // ... + ...createEmberCLIConfig(), + }); + + return require('@embroider/compat').compatBuild(app, Webpack, { + // your Embroider options... + packagerOptions: { + webpackConfig: { + // any custom webpack options you might have + ...createWebpackConfig(), + }, + }, + }); +}; ``` -ember install ember-cli-bundle-analyzer + +With this config, when the environment variable `ENABLE_BUNDLE_ANALYZER` is set, it will enable the addon and apply required options to both Ember CLI and ember-auto-import to fully enable source maps with the required fidelity level. + +> The reason the addon is not enabled by default is that it would be pointless if not having proper source maps fully enabled as well. And this might not be what you want by default, as generating full source maps comes at a cost of increased build times. On top of that you might also want to analyze the bundles only in production mode. + +Note that this might override some of your existing custom settings for source maps or ember-auto-import if you have those. So if that does not work for you, you can either try to deep merge the configs as in the following example, or provide your own explicit configs based of what [`createEmberCLIConfig` provides](./create-config.js). + +```js +// ember-cli-build.js +const EmberApp = require('ember-cli/lib/broccoli/ember-app'); +const { + createEmberCLIConfig, +} = require('ember-cli-bundle-analyzer/create-config'); +const { defaultsDeep } = require('ember-cli-lodash-subset'); + +module.exports = function (defaults) { + const app = new EmberApp( + defaults, + defaultsDeep( + { + // your other options are here + // ... + }, + createEmberCLIConfig() + ) + ); + + return app.toTree(); +}; ``` -## Usage +### Config -After you have started your development server using `ember serve`, this addon adds a custom middleware listening to -`/_analyze`. So just open `http://localhost:4200/_analyze` in your web browser to access the analyzer output. +You can customize the precessing by setting any of the following configs into the `'bundleAnalyzer'` key of your +`ember-cli-build.js`: -While it processes the data, which can take a while due to live minification and compression of all involved modules, -a loading screen is displayed. After processing has finished you should see the final output. +- `enabled` (boolean): set to `true` to enable the addon. `false` by default. -Live reloading is supported, so whenever you change a project file the output will be re-computed and updated. +- `ignoreTestFiles` (boolean): by default it will exclude all test files from the output. Set this to `false` to include + them. -### Options +- `ignore` (string | string[]): add files to ignore. Glob patterns are supported, e.g. `*-fastboot.js`. -You can customize the precessing by setting any of the following options into the `'bundle-analyzer'` key of your -`ember-cli-build.js`: +### Source maps -* `ignoreTestFiles` (boolean): by default it will exclude all test files from the output. Set this to `false` to include -them. +The bundle size output that you see coming from this addon can only be as good as the underlying source maps are. For [source-map-explorer](https://github.com/danvk/source-map-explorer) to correctly process those, they should have the full source code included inline (which is the `sourcesContent` field in a `.map` file). -* `ignore` (string | string[]): add files to ignore. Glob patterns are supported, e.g. `*-fastboot.js`. +For the `broccoli-concat` based part of Ember CLI (processing the app itself as well as all v1 addons), enabling source maps using `sourcemaps: { enabled: true },` in `ember-cli-config.js` will be enough. +For any `webpack` based build (be it ember-auto-import or Embroider), the default settings will _not_ be enough. The only setting that works reliably is enabling high-fidelity source maps using `devtool: 'source-map'`. + +Again, for enabling source maps with the recommended options, using the `createEmberCLIConfig()` helper as mentioned above is recommended. + +For further information consider these resources: + +- [Enabling source maps in Ember CLI](https://cli.emberjs.com/release/advanced-use/asset-compilation/#sourcemaps) +- [Adding custom webpack config to ember-auto-import](https://github.com/ef4/ember-auto-import#customizing-build-behavior) +- [Adding custom webpack config to Embroider](https://github.com/embroider-build/embroider#options) +- [webpack's devtool](https://webpack.js.org/configuration/devtool/) + +## Usage + +You need to have the addon and source maps enabled as described under [Setup](#setup). When following the recommended approach of using `createEmberCLIConfig` to apply the addon provided presets, then opting into the bundle-analyzer enabled mode is done by enabling the `ENABLE_BUNDLE_ANALYZER` environment flag when starting your local dev server. Most likely you will also want to analyze the production mode build, to exclude any debugging code. So the final invocation would be: + +```sh +ENABLE_BUNDLE_ANALYZER=true ember serve --prod +``` + +After startup this addon adds a custom middleware listening to the `/_analyze` URL path. So just open [http://localhost:4200/\_analyze](http://localhost:4200/_analyze) in your web browser to access the analyzer output. + +While it processes the data a loading screen might appear, after which the final output should display. + +Live reloading is supported, so whenever you change a project file the output will be re-computed and updated automatically. ## Contributing See the [Contributing](CONTRIBUTING.md) guide for details. - ## License This project is licensed under the [MIT License](LICENSE.md). diff --git a/create-config.js b/create-config.js new file mode 100644 index 0000000..f98e1de --- /dev/null +++ b/create-config.js @@ -0,0 +1,44 @@ +function createEmberCLIConfig(forceEnabled = undefined, ownConfig = {}) { + const isEnabled = forceEnabled ?? !!process.env.ENABLE_BUNDLE_ANALYZER; + + return isEnabled + ? { + bundleAnalyzer: { + enabled: true, + ...ownConfig, + }, + fingerprint: { + enabled: false, + }, + sourcemaps: { enabled: true, extensions: ['js', 'css'] }, + autoImport: { + webpack: createWebpackConfig(isEnabled), + }, + } + : {}; +} + +function createWebpackConfig(forceEnabled) { + const isEnabled = forceEnabled ?? !!process.env.ENABLE_BUNDLE_ANALYZER; + + return isEnabled + ? { + devtool: 'source-map', + optimization: { + chunkIds: 'named', + }, + output: { + clean: true, + // Ideally we would tweak the webpack chunk names here like below, to give the user some more understandable names that just random IDs. + // But the problem is that ember-auto-import and Embroider don't allow for the same config to work for both. + // filename: 'assets/chunk.[id].js', + // chunkFilename: 'assets/chunk.[id].js', + }, + } + : {}; +} + +module.exports = { + createEmberCLIConfig, + createWebpackConfig, +}; diff --git a/docs/demo.html b/docs/demo.html index 1307744..cdf7ce1 100644 --- a/docs/demo.html +++ b/docs/demo.html @@ -1,20819 +1,7618 @@ - - - Broccoli Concat Analyser + + + + [combined] - Source Map Explorer - - - - + + +
+ - window.Tooltip = Tooltip; - })(this, document); - +
+
+ - - - - maxGroupLevelsDrawn: Number.MAX_VALUE, - maxGroupLabelLevelsDrawn: Number.MAX_VALUE, - groupLabelVerticalPadding: 0.2, - rolloutDuration: 0, - pullbackDuration: 0, - fadeDuration: 0, - zoomMouseWheelDuration: 300, - openCloseDuration: 200, - titleBarDecorator(opts, props, vars) { - vars.titleBarShown = false; - }, + - onGroupClick(event) { - preventDefault(event); - zoomOutDisabled = false; - foamtree.zoom(event.group); - }, + - - - Fork me on GitHub -
- - \ No newline at end of file + selectBundle(selectedBundleId); + + + diff --git a/docs/screen.png b/docs/screen.png index 5dcfe9d..e48fece 100644 Binary files a/docs/screen.png and b/docs/screen.png differ diff --git a/ember-cli-build.js b/ember-cli-build.js index 366cbe5..5d362b0 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -1,10 +1,17 @@ 'use strict'; const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); +const { + createEmberCLIConfig, + createWebpackConfig, +} = require('./create-config'); module.exports = function (defaults) { const app = new EmberAddon(defaults, { // Add options here + + // for our dummy app, we always want to enable us + ...createEmberCLIConfig(true), }); /* @@ -21,5 +28,10 @@ module.exports = function (defaults) { package: 'qunit', }, ], + packagerOptions: { + webpackConfig: { + ...createWebpackConfig(true), + }, + }, }); }; diff --git a/index.js b/index.js index cfccd14..bd83c9a 100644 --- a/index.js +++ b/index.js @@ -2,19 +2,12 @@ const path = require('path'); const debug = require('debug')('ember-cli-bundle-analyzer'); -const { createOutput, summarizeAll } = require('broccoli-concat-analyser'); -const fs = require('fs'); -const sane = require('sane'); -const touch = require('touch'); -const hashFiles = require('hash-files').sync; -const tmp = require('tmp'); -const VersionChecker = require('ember-cli-version-checker'); const interceptStdout = require('intercept-stdout'); const injectLivereload = require('./lib/inject-livereload'); +const explore = require('source-map-explorer').explore; +const glob = require('fast-glob'); const REQUEST_PATH = '/_analyze'; -const BROCCOLI_CONCAT_PATH_SUPPORT = '3.6.0'; -const BROCCOLI_CONCAT_LAZY_SUPPORT = '3.7.0'; module.exports = { name: require('./package').name, @@ -25,49 +18,67 @@ module.exports = { _buildCallback: null, _computePromise: null, _buildPromise: null, + bundleFiles: [ + 'dist/assets/*.js', + // ignore CSS files for now, due to https://github.com/ember-cli/ember-cli/issues/9384 + // 'dist/assets/*.css' + ], init() { this._super.init && this._super.init.apply(this, arguments); debug(`${this.name} started.`); - - let checker = new VersionChecker(this); - this.concatVersion = checker.for('broccoli-concat'); - - if (this.concatVersion.lt(BROCCOLI_CONCAT_LAZY_SUPPORT)) { - debug(`broccoli-concat v${this.concatVersion.version} does not support lazy stats activation, forced to activate prematurely.`); - this.enableStats(); - } - this.initConcatStatsPath(); }, included(app) { this._super.included.apply(this, arguments); - // this.app = app; - let options = app.options['bundle-analyzer'] || {}; - let ignoredFiles = options && options.ignore || []; + this.checkSourcemapConfigs(); + + let options = app.options['bundleAnalyzer'] || {}; + this.analyzerOptions = options; + + let ignoredFiles = (options && options.ignore) || []; if (!Array.isArray(ignoredFiles)) { ignoredFiles = [ignoredFiles]; } - // it seems ember itself bundles its files before they are added to vender.js, which causes concat stats to be - // generated which are irrelevant to the final bundle. So exclude them... - ignoredFiles = ignoredFiles.concat('ember.js', 'ember-testing.js'); - if (options.ignoreTestFiles !== false) { - ignoredFiles = ignoredFiles.concat('tests.js', 'test-support.js', 'test-support.css', '*-test.js'); + ignoredFiles = ignoredFiles.concat( + 'tests.js', + 'test-support.js', + 'test-support.css' + ); } this.ignoredFiles = ignoredFiles; }, - initConcatStatsPath() { - // if broccoli-concat supports a custom path for stats data, put the data in a temp folder outside of the project! - if (this.concatVersion.gte(BROCCOLI_CONCAT_PATH_SUPPORT)) { - this.concatStatsPath = tmp.dirSync().name; - process.env.CONCAT_STATS_PATH = this.concatStatsPath; - } else { - this.concatStatsPath = path.join(process.cwd(), 'concat-stats-for'); + checkSourcemapConfigs() { + if (!this.isEnabled()) { + return; + } + + const emberCliSupport = this.app.options.sourcemaps?.enabled; + const emberAutoImportSupport = + this.app.options.autoImport?.webpack?.devtool; + // @todo Embroider detection + + if (!emberCliSupport) { + this.ui.writeWarnLine( + 'ember-cli-bundle-analyzer requires source maps to be enabled, but they are turned off for Ember CLI. Please see https://github.com/simonihmig/ember-cli-bundle-analyzer#source-maps for how to enable them!' + ); + } + + if (emberAutoImportSupport !== 'source-map') { + if (!emberAutoImportSupport) { + this.ui.writeWarnLine( + `ember-cli-bundle-analyzer requires fully enabled source maps for ember-auto-import, but they are turned off. Please see https://github.com/simonihmig/ember-cli-bundle-analyzer#source-maps for how to enable them!` + ); + } else { + this.ui.writeWarnLine( + `ember-cli-bundle-analyzer requires fully enabled source maps for ember-auto-import, but the config is set to "${emberAutoImportSupport}". Please see https://github.com/simonihmig/ember-cli-bundle-analyzer#source-maps for how to enable them!` + ); + } } }, @@ -80,74 +91,80 @@ module.exports = { addAnalyzeMiddleware(config) { let app = config.app; - app.get(REQUEST_PATH, (req, res) => { + app.get(REQUEST_PATH, async (req, res) => { + this.debugRequest(req); this.initBuildWatcher(); - Promise.resolve() - .then(() => this._buildPromise) - .then(() => { - if (!this.hasStats()) { - res.sendFile(path.join(__dirname, 'lib', 'output', 'computing', 'index.html')); - return; - } - - if (!this._statsOutput) { - res.sendFile(path.join(__dirname, 'lib', 'output', 'computing', 'index.html')); - } else { - res.send(this._statsOutput); - } - }); + await this._buildPromise; + if (!this._statsOutput) { + res.sendFile( + path.join(__dirname, 'lib', 'output', 'computing', 'index.html') + ); + } else { + res.send(this._statsOutput); + } }); - app.get(`${REQUEST_PATH}/compute`, (req, res) => { - this.initWatcher(); + app.get(`${REQUEST_PATH}/compute`, async (req, res) => { + this.debugRequest(req); this.initBuildWatcher(); - Promise.resolve() - .then(() => this._buildPromise) - .then(() => { - if (!this.hasStats()) { - this.enableStats(); - this.triggerBuild(); - return this._initialBuildPromise; - } - }) - .then(() => { - // @todo make this throw an exception when there are no stats - this.computeOutput() - .then((output) => { - this._statsOutput = injectLivereload(output); - res.redirect(REQUEST_PATH); - }) - .catch((e) => { - this.ui.writeError(e); - res.sendFile(path.join(__dirname, 'lib', 'output', 'no-stats', 'index.html')); - }); - }) - .catch(e => { + await this._buildPromise; + try { + let output = await this.computeOutput(); + this._statsOutput = injectLivereload(output); + res.redirect(REQUEST_PATH); + } catch (e) { + if (e.errors) { + e.errors.map((e) => this.ui.writeError(e.error)); + } else { this.ui.writeError(e); - }); + } + res.sendFile( + path.join(__dirname, 'lib', 'output', 'no-stats', 'index.html') + ); + } }); }, - computeOutput() { + debugRequest(req) { + debug(`${req.method} ${req.url}`); + }, + + async computeOutput() { if (!this._computePromise) { debug('Computing stats...'); - this._computePromise = summarizeAll(this.concatStatsPath, this.ignoredFiles) - .then(() => { - debug('Computing finished.'); - this._computePromise = null; - return createOutput(this.concatStatsPath); - }); + + let files = await glob(this.bundleFiles, { + ignore: this.ignoredFiles.map((file) => `dist/assets/${file}`), + }); + debug('Found these bundles: ' + files.join(', ')); + this._computePromise = explore(files, { + output: { format: 'html' }, + replaceMap: { 'dist/': '', 'webpack://__ember_auto_import__/': '' }, + noBorderChecks: true, + }).then((result) => { + debug( + 'Computing finished, bundle results: ' + + JSON.stringify(result.bundles) + ); + + result.errors.map((e) => + this.ui[e.isWarning ? 'writeWarnLine' : 'writeErrorLine']( + `${e.bundleName}: ${e.message}` + ) + ); + + this._computePromise = null; + return result.output; + }); } return this._computePromise; }, initBuildWatcher() { let resolve; - let initialResolve; if (this._buildWatcher) { return; } - this._initialBuildPromise = new Promise((_resolve) => initialResolve = _resolve); this._buildWatcher = interceptStdout((text) => { if (text instanceof Buffer) { text = text.toString(); @@ -158,82 +175,23 @@ module.exports = { if (text.match(/file (added|changed|deleted)/)) { debug('Rebuild detected'); - this._buildPromise = new Promise((_resolve) => resolve = _resolve); + this._buildPromise = new Promise((_resolve) => (resolve = _resolve)); + this._statsOutput = null; } if (text.match(/Build successful/)) { + if (!resolve) { + return; + } debug('Finished build detected'); setTimeout(() => { resolve(); - initialResolve(); }, 1000); } }); }, - initWatcher() { - if (this._hasWatcher) { - return; - } - debug('Initializing watcher on json files'); - let watcher = sane(this.concatStatsPath, { glob: ['*.json'], ignored: ['*.out.json'] }); - watcher.on('change', this._handleWatcher.bind(this)); - watcher.on('add', this._handleWatcher.bind(this)); - watcher.on('delete', this._handleWatcher.bind(this)); - this._hasWatcher = true; - }, - - _handleWatcher(filename, root/*, stat*/) { - let file = path.join(root, filename); - let hash = hashFiles({ files: [file] }); - - if (this._hashedFiles[filename] !== hash) { - debug(`Cache invalidated by ${filename}`); - this._statsOutput = null; - this._hashedFiles[filename] = hash; - } - }, - isEnabled() { - return true; - }, - - hasStats() { - return !!process.env.CONCAT_STATS && this.concatStatsPath && fs.existsSync(this.concatStatsPath); - }, - - enableStats() { - debug('Enabled stats generation'); - process.env.CONCAT_STATS = 'true'; + return this.app.options['bundleAnalyzer']?.enabled === true; }, - - triggerBuild() { - debug('Triggering build'); - let mainFile = this.getMainFile(); - if (mainFile) { - debug(`Touching ${mainFile}`); - touch(mainFile); - } else { - throw new Error('No main file found to trigger build'); - } - }, - - getMainFile() { - let { root } = this.project; - let mainCandidates = [ - 'app/app.js', // app - 'src/main.js', // MU - 'tests/dummy/app/app.js', // addon dummy app - 'app/app.ts', // app (TS) - 'src/main.ts', // MU (TS) - 'tests/dummy/app/app.ts' // addon dummy app (TS) - ] - .map((item) => path.join(root, item)); - - for (let mainFile of mainCandidates) { - if (fs.existsSync(mainFile)) { - return mainFile - } - } - } }; diff --git a/node-tests/acceptance-test.js b/node-tests/acceptance-test.js index adfa06d..f6a218c 100644 --- a/node-tests/acceptance-test.js +++ b/node-tests/acceptance-test.js @@ -1,8 +1,6 @@ const chai = require('chai'); const chaiHttp = require('chai-http'); const { App } = require('ember-cli-addon-tests'); -const tmp = require('tmp'); - const { expect } = chai; const port = 4444; const baseUrl = `http://localhost:${port}`; @@ -49,27 +47,10 @@ describe('acceptance', function() { .and.be.html; expect(res.text) - .to.include('