Giter Site home page Giter Site logo

Comments (10)

bcardarella avatar bcardarella commented on May 20, 2024

@lolmaus what version of ember-cli are you using? This is clearly bad

from ember-cli-custom-assertions.

lolmaus avatar lolmaus commented on May 20, 2024

Ember CLI 1.13.8
Ember 2.1.0-beta.2
ember-qunit 0.4.10
qunit 1.19.0
ember-cli-qunit 1.0.1

from ember-cli-custom-assertions.

bcardarella avatar bcardarella commented on May 20, 2024

Thank you, I'll try updating our test suite for that set. Will report back soon

from ember-cli-custom-assertions.

lolmaus avatar lolmaus commented on May 20, 2024

🙇

from ember-cli-custom-assertions.

rwjblue avatar rwjblue commented on May 20, 2024

It might be an invalid import which would result in an error when the test modules are loaded, but with your ember-cli-qunit version this error should be notated with a failing test (this is done here).

from ember-cli-custom-assertions.

lolmaus avatar lolmaus commented on May 20, 2024

@rwjblue You're right:

TestLoader Failures: exam-sim-ember/tests/unit/models/exam-session-test: could not be loaded
Error: Could not find module exam-sim-ember/tests/unit/assertions

I'm doing import { assertionInjector } from '../assertions';.

This doesn't look right, but neither does this.

from ember-cli-custom-assertions.

rwjblue avatar rwjblue commented on May 20, 2024

Seems correct to me.

You added one extra level since your test is at tests/unit/models/exam-session-test.js, you would need to import { assertionInjector } from '../../assertions';.

from ember-cli-custom-assertions.

rwjblue avatar rwjblue commented on May 20, 2024

You could also use import { assertionInjector } from '<your app name>/tests/assertions'; if you didn't want to deal with the annoyance of the tracking down the right number of ../ to add when importing.

from ember-cli-custom-assertions.

rwjblue avatar rwjblue commented on May 20, 2024

As an aside, I'm pretty happy that ember-cli-qunit is giving you exactly what you need to fix this via a failing test. For quite a while errors thrown while evaluating the module (like invalid imports) caused the whole test module to be completely ignored with no indication of any failure.

from ember-cli-custom-assertions.

lolmaus avatar lolmaus commented on May 20, 2024

It didn't help me because there was no assertions file at that path, so it was pretty magical to me.

from ember-cli-custom-assertions.

Related Issues (12)

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.