Giter Site home page Giter Site logo

ember-addon-tests's People

Contributors

jelhan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ember-addon-tests's Issues

Clean-up temporary folders created on shutdown

Ember Addon Tests creates a temporary folder for the yarn workspaces. It needs to clean up these folder when the script execution ends. We may provide a flag to disable the clean up to ease debugging. E.g. as an environment variable EMBER_ADDON_TESTS_DISABLE_CLEANUP.

Provide API docs

API docs should be either provided as part of the README or as a website deployed on GitHub Pages. In both cases it would be great if they could be generated automatically based on available TypeScript types. Additional information may be provided using TSDoc.

Add method to install own package

TestProject provides addOwnPackageAsDependency and addOwnPackageAsDevDependency but it misses a method to install own package as an ember addon (ember install <own-package>). Such a method should be preferred as it would match installation instructions of most ember addons.

Support multiple Ember CLI versions

TestProject.createEmberApp() and TestProject.createEmberAddon() should take an Ember CLI version to use as an optional argument.

Implementation is a little bit tricky cause npx does not work reliable if current working directory is a yarn workspaces (ember-cli/ember-cli#9331). As a work-a-round the npx could be executed with a working directory outside of the yarn workspace. But in general the performance of npx is very bad compared to using the Ember CLI installed globally or in yarn workspace.

I considered installing the chosen Ember CLI in the workspace as a work-a-round. Many dependencies could be reused when down- or upgrading an Ember CLI version. Therefore the overhead should be way slower than using npx all the time. But Ember CLI has an issue which prevents installing it as a workspace dependency (ember-cli/ember-cli#9328).

None of them should be show stoppers but both make it more complex than it seems at the first go.

Ignore all folders and files listed in .npmignore when copying files of packages under test

Currently the project is using a hard-coded list of folders to be ignored when copying required files of a package under test:

// TODO: Use `.npmignore`, `.gitignore` and `files` property in package.json
// to only copy files those files, which will end up in NPM package.
const ignoreFolders = ['.git', 'node_modules'];
fs.copySync(
packageLocation,
`${workspaceDir}/packages-under-test/${path.basename(packageName)}`,
{
filter(src) {
return !ignoreFolders.some((ignoreFolder) => {
const fileName = src.replace(`${packageLocation}/`, '');
return fileName.startsWith(ignoreFolder);
});
},
}
);

This may not only slow down build time but also cause bugs. I just run into an issue with a stale .node_modules.ember-try folder causing the tests to fail. For some reason some of the files in that folder could not be copied, which causes the tests to fail very early.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.