{"library":"qunit-notifications","title":"QUnit Notifications","description":"qunit-notifications is a QUnit plugin that integrates Web Notification API support directly into your QUnit test suite, providing immediate desktop notifications for test results. When enabled, it adds a 'Notifications' checkbox to the QUnit toolbar and displays a system notification upon test completion, detailing whether the tests passed or failed. This feature is particularly useful for developers who prefer to stay in their IDE without constantly switching back to the browser to check test outcomes. The package currently stands at version 1.0.0, released in 2014, and does not appear to have an active release cadence, suggesting it is no longer actively maintained. Its primary differentiator is its direct, simple integration with the global QUnit object to augment its UI and provide system-level feedback, contrasting with more modern, CLI-based test runners or browser automation tools.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install qunit-notifications"],"cli":null},"imports":["QUnit.notifications();","QUnit.notifications({\n  timeout: 5000,\n  titles: { passed: 'It worked!', failed: 'Fix your code!' }\n});"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"<!-- Include QUnit in your HTML test runner -->\n<link rel=\"stylesheet\" href=\"https://code.jquery.com/qunit/qunit-2.20.0.css\">\n<script src=\"https://code.jquery.com/qunit/qunit-2.20.0.js\"></script>\n\n<!-- Include qunit-notifications after QUnit -->\n<script src=\"path/to/qunit-notifications.js\"></script>\n\n<div id=\"qunit\"></div>\n<div id=\"qunit-fixture\"></div>\n\n<script>\n  // Initialize QUnit Notifications with custom options\n  QUnit.notifications({\n    timeout: 6000,\n    titles: {\n      passed: 'Tests All Good!',\n      failed: 'Uh oh, tests failed!'\n    },\n    bodies: {\n      passed: '{{passed}} of {{total}} assertions passed in {{runtime}}ms.',\n      failed: '{{failed}} assertions failed out of {{total}}.'\n    }\n  });\n\n  // Example QUnit tests\n  QUnit.module('My Awesome Module');\n\n  QUnit.test('a basic test example', function(assert) {\n    assert.expect(1);\n    assert.ok(true, 'This test should pass.');\n  });\n\n  QUnit.test('another test that might fail', function(assert) {\n    assert.expect(2);\n    let value = 'test';\n    assert.equal(value, 'test', 'Value should be \"test\".');\n    assert.equal(1, 2, 'This assertion will fail.'); // Intentional failure\n  });\n\n</script>","lang":"javascript","description":"This quickstart demonstrates how to include QUnit and the qunit-notifications plugin in an HTML page, then initialize notifications with custom titles and body messages, followed by example QUnit tests.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}