aurelia / testing

Simplifies the testing of UI components by providing an elegant, fluent interface for arranging test setups along with a number of runtime debug/test helpers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StageComponent does not work without `withResources`

plwalters opened this issue · comments

Let's add a new method for creating the component without resources, such as withoutResources so that the component can still be created without making up dependencies.

I'm not sure I understand. You can't create a component that doesn't exist in view resources. Can you explain?

Take for instance the example of having a service that interacts with the DOM. You want to use the Aurelia testing library for creating a custom element and then expect that you can test the service in isolation. The service is loaded through the container and has no corresponding view, but you want to create a view. Without calling .withResources you would have to do this using a faux DOM of some sorts, but with Aurelia testing you can do this but passing '' in to .withResources. Would be nice to have a way to create the staged component without specifying and dependent resources.

And I realize this could be done through a custom attribute but this caters more to the user who is augmenting a page with Aurelia as opposed to running everything with Aurelia.

Stale.. since november 2014, but interesting

@PWKad Are you able to create a PR to add this feature? If not, I'd like to close this out. Please let me know.

async triageQuestion(id) =>{
 respondSameDay()
 let response = await getResponseFromOP( { timeout : 4weeks } )
 if(!response) {
    closeQuestion(id,randomReason())
 }
}