{"id":18895,"library":"unittest","title":"unittest","description":"A unit test case example package. Version 1.0.0 provides basic test utilities. Minimal documentation and no recent updates. Sporadic release cadence.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install unittest","lang":"bash","label":"npm"},{"cmd":"yarn add unittest","lang":"bash","label":"yarn"},{"cmd":"pnpm add unittest","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package uses ESM.","wrong":"const { TestRunner } = require('unittest')","symbol":"TestRunner","correct":"import { TestRunner } from 'unittest'"},{"note":"Named export.","wrong":"import TestCase from 'unittest'","symbol":"TestCase","correct":"import { TestCase } from 'unittest'"},{"note":"Named export.","wrong":"const assert = require('unittest').assert","symbol":"assert","correct":"import { assert } from 'unittest'"}],"quickstart":{"code":"import { TestRunner, TestCase, assert } from 'unittest';\n\nconst runner = new TestRunner();\nconst test = new TestCase('example', () => {\n  assert.equal(1 + 1, 2);\n});\nrunner.add(test);\nrunner.run();\nconsole.log('Tests passed.');","lang":"typescript","description":"Basic usage: create a TestRunner, add a TestCase with an assertion, and run."},"warnings":[{"fix":"Review source code for API details.","message":"Package has no README. Lack of documentation may complicate usage.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use `import { TestCase } from 'unittest'`.","cause":"Using default import instead of named import for TestCase.","error":"TypeError: unittest_1.TestCase is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}