ember-cli-test-info
raw JSON → 1.0.0 verified Sat Apr 25 auth: no javascript
A utility package for Ember CLI that extracts and provides test information for blueprints and addons. Version 1.0.0 is stable, with no recent updates. It is used internally by Ember CLI's blueprint system to generate test files. Minimal documentation; primarily a dependency for other Ember CLI addons and blueprints.
Common errors
error SyntaxError: Named export 'testInfo' not found. The requested module 'ember-cli-test-info' is a CommonJS module; it may not support all module.exports as named exports. ↓
cause Attempting to import named export 'testInfo' from a default-only CommonJS module.
fix
Use default import:
import testInfo from 'ember-cli-test-info'. Warnings
gotcha The package exports only a default function; no named exports. ↓
fix Use `import testInfo from 'ember-cli-test-info'`.
deprecated The package has not been updated since 2016; functionality may be superseded by newer Ember CLI versions. ↓
fix Check Ember CLI documentation for current test info extraction methods.
Install
npm install ember-cli-test-info yarn add ember-cli-test-info pnpm add ember-cli-test-info Imports
- default wrong
const testInfo = require('ember-cli-test-info');correctimport testInfo from 'ember-cli-test-info'; - testInfo wrong
import * as testInfo from 'ember-cli-test-info';correctconst testInfo = require('ember-cli-test-info'); - testInfo wrong
import { testInfo } from 'ember-cli-test-info';correctimport testInfo from 'ember-cli-test-info';
Quickstart
import testInfo from 'ember-cli-test-info';
// Example: get test info for a module name
const info = testInfo('my-component');
console.log(info); // { name: 'my-component', ... }