Do you have any tutorial about exposing the object to be tested and referring a dependency

Open
#90 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, node.js

Research direction

Start with the testrunner configuration described in the issue, especially the code setting, and determine how application objects and dependencies are loaded for tests. Check the existing usage documentation and examples for a supported Sinon integration path; done means a newcomer can follow a documented example to access application code and use Sinon in a test.

Written by the indexing model from the issue text.

Description

documentation

I just guess you made a great lib of qunit. But cannot find any information about how to referring/requiring/my code to be tested and I also need to use sinon to mock something how can I include sinonjs in my testing?

I mean I know the testrunner has some thing like:

{
    code: "path/to/mycode",
}

but how can I get access to my vars, objects and dear sinon.

Dominant language
JavaScript
Stars
171
Forks
51
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qunitjs/node-qunit

All issues in qunitjs/node-qunit

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.