Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
High Level DOM Assertions for QUnit
assert.dom('h1').exists();
assert.dom('h1').hasClass('title');
assert.dom('h1').hasText('Welcome to Ember, John Doe!');
assert.dom('input').isFocused();
assert.dom('input').hasValue(/.+ Doe/);
assert.dom('input').hasAttribute('type', 'text');
[!NOTE] qunit-dom was written and is maintained by Mainmatter and contributors. We offer consulting, training, and team augmentation for web development teams – check out our website to learn more!
npm install --save-dev qunit-dom
or using yarn
:
yarn add --dev qunit-dom
ember-qunit
v6.x and aboveImport and run the setup
function in your test-helper.js
file:
// tests/test-helper.js
import * as QUnit from 'qunit';
import { setup } from 'qunit-dom';
//...
setup(QUnit.assert);
setApplication(Application.create(config.APP));
start();
//...
This will attach the APIs to QUnit's assert
object.
Install qunit-dom v2.0.0
<script>
TagLoad qunit-dom.js
after qunit.js
:
<script src="https://unpkg.com/qunitjs/qunit/qunit.js"></script>
<script src="https://unpkg.com/qunit-dom/dist/qunit-dom.js"></script>
Once installed the DOM element assertions are available at assert.dom(...).*
:
test('the title is welcoming', function(assert) {
assert.dom('#title').hasText('Welcome to QUnit');
});
All available assertions are documented in API.md.
A basic codemod to automatically convert your assertions is available at https://github.com/simplabs/qunit-dom-codemod.
qunit-dom
includes type definition files, but the way it extends QUnit means
that you need import it somewhere so that TS and your editor can pick up the
types. It is recommended to add the following line to your
tests/test-helper.ts
file:
import 'qunit-dom';
Rename your tests/test-helper.js
to .ts
if you do not have such a
file yet.
See CONTRIBUTING.md.
qunit-dom is developed by and © Mainmatter GmbH and contributors. It is released under the MIT License.
FAQs
High Level DOM Assertions for QUnit
The npm package qunit-dom receives a total of 88,782 weekly downloads. As such, qunit-dom popularity was classified as popular.
We found that qunit-dom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.