{"_id":"@bradpitcher/unittestscad","_rev":"6-cb01b86578623a44baa41b2c4b7e721a","name":"@bradpitcher/unittestscad","description":"UnitTestSCAD: Unit Testing for OpenSCAD","dist-tags":{"latest":"4.1.0"},"versions":{"4.0.0":{"name":"@bradpitcher/unittestscad","version":"4.0.0","keywords":["unit","test","openscad"],"author":{"name":"Jonathan Law"},"license":"MIT","_id":"@bradpitcher/unittestscad@4.0.0","homepage":"https://gitlab.com/bradpitcher/UnitTestSCAD","dist":{"shasum":"8ee7a3453d28ba4b625052bf6c812aebfc34fb3c","tarball":"https://registry.npmjs.org/@bradpitcher/unittestscad/-/unittestscad-4.0.0.tgz","fileCount":64,"integrity":"sha512-Kl3OARGyN30dHIlwMyBvXZVOQFEcAW1+cMctanVvBJe9H77cyAJ1aW89dOPKRsF8jf+/o4Fnse/m11iOMeNkYA==","signatures":[{"sig":"MEUCIQCekt6g5cofzIng/hl2NqtvWI+IyX5ZctJnI56aHktwKwIgR0jcCWCPs3dlGRfsKIOE75gxwadFxdw3hJKrq1kGBJk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91588},"main":"src/index.js","gitHead":"dd681382c3f23cec59fa9b686372e7b8d2992a70","scripts":{"doc":"jsdoc -c ./jsdoc.conf.json","lint":"npm run lint-src && npm run lint-spec","test":"npm run lint && npm run unit-test && npm run integration-test","release":"node node_modules/llama-rlsr/src/llama-rlsr.js llama-rlsr.config.js","lint-fix":"npm run lint-src -- --fix && npm run lint-spec -- --fix","lint-src":"eslint -c .eslintrc.src.json ./src/**/*.js","lint-spec":"eslint -c .eslintrc.spec.json ./spec/**/*.js","precommit":"lint-staged","unit-test":"jest --coverage spec/unit","integration-test":"jest spec/integration"},"_npmUser":{"name":"bradpitcher","email":"unicordion@proton.me"},"repository":{"url":"git+ssh://git@gitlab.com/bradpitcher/UnitTestSCAD.git","type":"git"},"_npmVersion":"9.2.0","description":"UnitTestSCAD: Unit Testing for OpenSCAD","directories":{},"lint-staged":{"./src/**/*.js":["npm run lint-src -- --fix","git add"],"./spec/**/*.js":["npm run lint-spec -- --fix","git add"]},"_nodeVersion":"18.19.1","dependencies":{"xml2js":"^0.4.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^0.14.3","jsdoc":"^3.6.11","sinon":"^6.1.5","eslint":"^8.55.0","rimraf":"^2.6.2","github-api":"^3.0.0","jest-junit":"^16.0.0","llama-rlsr":"0.0.6","simple-git":"^1.98.0","lint-staged":"^7.2.2","llama-rlsr-npm":"0.0.2","eslint-plugin-jest":"^28.5.0","llama-rlsr-keep-a-changelog":"0.0.4"},"_npmOperationalInternal":{"tmp":"tmp/unittestscad_4.0.0_1718939704820_0.3827858117289453","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"@bradpitcher/unittestscad","version":"4.0.1","keywords":["unit","test","openscad"],"author":{"name":"Jonathan Law"},"license":"MIT","_id":"@bradpitcher/unittestscad@4.0.1","homepage":"https://gitlab.com/bradpitcher/UnitTestSCAD","bugs":{"url":"https://gitlab.com/bradpitcher/UnitTestSCAD/-/issues"},"dist":{"shasum":"859af2eb4b8c41b0ed52c9a3a03a997ea801d289","tarball":"https://registry.npmjs.org/@bradpitcher/unittestscad/-/unittestscad-4.0.1.tgz","fileCount":64,"integrity":"sha512-EXs4pg4lj9wyubu7uJq9hD2rV2ylKTcS60lbZZnobFUeo6VkXIssLvWdJnDSj1laPu/GWBPVlW5q+z8GmWCljg==","signatures":[{"sig":"MEUCIQCvK/m98gMCCoXVV0pePrasK9tMOhXyQijhnT/aIU1HDwIgSnuIFOc02KD8PWh9lZ1v6MUSt+ntel6+eIuX0hQlF5k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91656},"main":"src/index.js","gitHead":"b2a3a4bf6f82f3581eb6709356ab18d90ec8e348","scripts":{"doc":"jsdoc -c ./jsdoc.conf.json","lint":"npm run lint-src && npm run lint-spec","test":"npm run lint && npm run unit-test && npm run integration-test","release":"node node_modules/llama-rlsr/src/llama-rlsr.js llama-rlsr.config.js","lint-fix":"npm run lint-src -- --fix && npm run lint-spec -- --fix","lint-src":"eslint -c .eslintrc.src.json ./src/**/*.js","lint-spec":"eslint -c .eslintrc.spec.json ./spec/**/*.js","precommit":"lint-staged","unit-test":"jest --coverage spec/unit","integration-test":"jest spec/integration"},"_npmUser":{"name":"bradpitcher","email":"unicordion@proton.me"},"repository":{"url":"git+https://gitlab.com/bradpitcher/UnitTestSCAD.git","type":"git"},"_npmVersion":"9.2.0","description":"UnitTestSCAD: Unit Testing for OpenSCAD","directories":{},"lint-staged":{"./src/**/*.js":["npm run lint-src -- --fix","git add"],"./spec/**/*.js":["npm run lint-spec -- --fix","git add"]},"_nodeVersion":"18.19.1","dependencies":{"xml2js":"^0.4.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^0.14.3","jsdoc":"^3.6.11","sinon":"^6.1.5","eslint":"^8.55.0","rimraf":"^2.6.2","github-api":"^3.0.0","jest-junit":"^16.0.0","llama-rlsr":"0.0.6","simple-git":"^1.98.0","lint-staged":"^7.2.2","llama-rlsr-npm":"0.0.2","eslint-plugin-jest":"^28.5.0","llama-rlsr-keep-a-changelog":"0.0.4"},"_npmOperationalInternal":{"tmp":"tmp/unittestscad_4.0.1_1718941343225_0.10504159016302839","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"@bradpitcher/unittestscad","version":"4.0.2","keywords":["unit","test","openscad"],"author":{"name":"Jonathan Law"},"license":"MIT","_id":"@bradpitcher/unittestscad@4.0.2","homepage":"https://gitlab.com/bradpitcher/UnitTestSCAD","bugs":{"url":"https://gitlab.com/bradpitcher/UnitTestSCAD/-/issues"},"dist":{"shasum":"7841f96b450c0974246d8fb06e972a97560012c5","tarball":"https://registry.npmjs.org/@bradpitcher/unittestscad/-/unittestscad-4.0.2.tgz","fileCount":64,"integrity":"sha512-CGL4yHEL71zGBbGK/gYigcKIvUFGgqL6OXCJhoqloSzuRtlEzLS7MwIXzhPruuS4Yc1wtQn5yUBsv9xKF8ZIsw==","signatures":[{"sig":"MEYCIQD2zii0TBdbXYJxtJhYXpo3xYN3ZKG8xg7E6h1XxhFx/wIhAPW6PpxDwrLbwONnc/XY1x3z6ekcuoyj2v0R+mZ11bUz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91854},"main":"src/index.js","gitHead":"bb41b0e40b3c8662bcb3327b4a93ba52c01ceb91","scripts":{"doc":"jsdoc -c ./jsdoc.conf.json","lint":"npm run lint-src && npm run lint-spec","test":"npm run lint && npm run unit-test && npm run integration-test","release":"node node_modules/llama-rlsr/src/llama-rlsr.js llama-rlsr.config.js","lint-fix":"npm run lint-src -- --fix && npm run lint-spec -- --fix","lint-src":"eslint -c .eslintrc.src.json ./src/**/*.js","lint-spec":"eslint -c .eslintrc.spec.json ./spec/**/*.js","precommit":"lint-staged","unit-test":"jest --coverage spec/unit","integration-test":"jest spec/integration"},"_npmUser":{"name":"bradpitcher","email":"unicordion@proton.me"},"repository":{"url":"git+https://gitlab.com/bradpitcher/UnitTestSCAD.git","type":"git"},"_npmVersion":"9.2.0","description":"UnitTestSCAD: Unit Testing for OpenSCAD","directories":{},"lint-staged":{"./src/**/*.js":["npm run lint-src -- --fix","git add"],"./spec/**/*.js":["npm run lint-spec -- --fix","git add"]},"_nodeVersion":"18.19.1","dependencies":{"xml2js":"^0.4.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^0.14.3","jsdoc":"^3.6.11","sinon":"^6.1.5","eslint":"^8.55.0","rimraf":"^2.6.2","github-api":"^3.0.0","jest-junit":"^16.0.0","llama-rlsr":"0.0.6","simple-git":"^1.98.0","lint-staged":"^7.2.2","llama-rlsr-npm":"0.0.2","eslint-plugin-jest":"^28.5.0","llama-rlsr-keep-a-changelog":"0.0.4"},"_npmOperationalInternal":{"tmp":"tmp/unittestscad_4.0.2_1718977257008_0.06470983453589318","host":"s3://npm-registry-packages"}},"4.0.4":{"name":"@bradpitcher/unittestscad","version":"4.0.4","keywords":["unit","test","openscad"],"author":{"name":"Jonathan Law"},"license":"MIT","_id":"@bradpitcher/unittestscad@4.0.4","homepage":"https://gitlab.com/bradpitcher/UnitTestSCAD","bugs":{"url":"https://gitlab.com/bradpitcher/UnitTestSCAD/-/issues"},"dist":{"shasum":"eda0f6854b4e3a207cbe9a930a18fc40e8fdba9b","tarball":"https://registry.npmjs.org/@bradpitcher/unittestscad/-/unittestscad-4.0.4.tgz","fileCount":39,"integrity":"sha512-UA6L6sY8qAji4YUOJC4vL0sIXLuSvfWf9HFC7nZootkpXtvARE3vYjnw7AdZYS0E7Zwxl1IcAJQuPpRVezecbQ==","signatures":[{"sig":"MEUCIG65+nlD0H2PX6+xSgWG9o73/qUBFdm8AZVgQRkfhpc9AiEAnVUkSHqK74m66JJs31GyF46JD3tTaL9uKWPBbb2vVDw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44632},"main":"src/index.js","types":"./types/index.d.ts","gitHead":"cae3bb5f55a8ae25565ee370636257d76f4c0867","scripts":{"doc":"jsdoc -c ./jsdoc.conf.json -t ./node_modules/ink-docstrap/template","lint":"npm run lint-src && npm run lint-spec && tsc","test":"npm run lint && npm run unit-test && npm run integration-test","lint-fix":"npm run lint-src -- --fix && npm run lint-spec -- --fix","lint-src":"eslint -c .eslintrc.src.json ./src/**/*.js","lint-spec":"eslint -c .eslintrc.spec.json ./spec/**/*.js","precommit":"lint-staged","unit-test":"jest --coverage spec/unit","integration-test":"jest spec/integration"},"_npmUser":{"name":"bradpitcher","email":"unicordion@proton.me"},"repository":{"url":"git+https://gitlab.com/bradpitcher/UnitTestSCAD.git","type":"git"},"_npmVersion":"9.2.0","description":"UnitTestSCAD: Unit Testing for OpenSCAD","directories":{},"lint-staged":{"./src/**/*.js":["npm run lint-src -- --fix","git add"],"./spec/**/*.js":["npm run lint-spec -- --fix","git add"]},"_nodeVersion":"18.19.1","dependencies":{"xml2js":"^0.4.17"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^0.14.3","jsdoc":"^3.6.11","sinon":"^6.1.5","eslint":"^8.55.0","rimraf":"^2.6.2","github-api":"^3.0.0","jest-junit":"^16.0.0","llama-rlsr":"0.0.6","simple-git":"^1.98.0","typescript":"^5.5.2","lint-staged":"^7.2.2","ink-docstrap":"^1.3.2","llama-rlsr-npm":"0.0.2","eslint-plugin-jest":"^28.5.0","llama-rlsr-keep-a-changelog":"0.0.4"},"_npmOperationalInternal":{"tmp":"tmp/unittestscad_4.0.4_1719024893287_0.9660676004516047","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"@bradpitcher/unittestscad","version":"4.1.0","description":"UnitTestSCAD: Unit Testing for OpenSCAD","main":"src/index.js","types":"./types/index.d.ts","publishConfig":{"access":"public"},"scripts":{"lint-src":"eslint -c .eslintrc.src.json ./src/**/*.js","lint-spec":"eslint -c .eslintrc.spec.json ./spec/**/*.js","lint":"npm run lint-src && npm run lint-spec && tsc","lint-fix":"npm run lint-src -- --fix && npm run lint-spec -- --fix","unit-test":"jest --coverage spec/unit","integration-test":"jest spec/integration","test":"npm run lint && npm run unit-test && npm run integration-test","precommit":"lint-staged","prepublish":"npm run lint","doc":"jsdoc -c ./jsdoc.conf.json -t ./node_modules/ink-docstrap/template"},"lint-staged":{"./src/**/*.js":["npm run lint-src -- --fix","git add"],"./spec/**/*.js":["npm run lint-spec -- --fix","git add"]},"repository":{"type":"git","url":"git+https://gitlab.com/bradpitcher/UnitTestSCAD.git"},"keywords":["unit","test","openscad"],"author":{"name":"Jonathan Law"},"license":"MIT","bugs":{"url":"https://gitlab.com/bradpitcher/UnitTestSCAD/-/issues"},"homepage":"https://gitlab.com/bradpitcher/UnitTestSCAD","dependencies":{"xml2js":"^0.4.17"},"devDependencies":{"eslint":"^8.55.0","eslint-plugin-jest":"^28.5.0","github-api":"^3.0.0","husky":"^0.14.3","ink-docstrap":"^1.3.2","jest":"^29.7.0","jest-junit":"^16.0.0","jsdoc":"^3.6.11","lint-staged":"^7.2.2","llama-rlsr":"0.0.6","llama-rlsr-keep-a-changelog":"0.0.4","llama-rlsr-npm":"0.0.2","rimraf":"^2.6.2","simple-git":"^1.98.0","sinon":"^6.1.5","typescript":"^5.5.2"},"gitHead":"650d1bd16d6ba2f547de62dcadf4e0458f401c7a","_id":"@bradpitcher/unittestscad@4.1.0","_nodeVersion":"18.19.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-VgGWGHraeWraDreFYW1o0X+3apQ9Ho9CJwDxnJ6G8PtUaH3SbDVYChwkD/5V0uivH7GWHI1oQmKufWYS5B07nw==","shasum":"30bb8f82be31e8bedef2e4a0426f6ef6557cce26","tarball":"https://registry.npmjs.org/@bradpitcher/unittestscad/-/unittestscad-4.1.0.tgz","fileCount":39,"unpackedSize":45031,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTpzAsJ+3tDOvbznGlZ1Zhnx3nFi6HwpZxGmYMdXQNWAIgcDPU8XrFvOqfLnZa5qb4ld/CBEJ5QCp6ehRlhxCv7qY="}]},"_npmUser":{"name":"bradpitcher","email":"unicordion@proton.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unittestscad_4.1.0_1719069289122_0.7467652035627739"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-21T03:15:04.700Z","modified":"2024-06-22T15:14:49.457Z","4.0.0":"2024-06-21T03:15:05.025Z","4.0.1":"2024-06-21T03:42:23.418Z","4.0.2":"2024-06-21T13:40:57.173Z","4.0.3":"2024-06-22T02:28:33.734Z","4.0.4":"2024-06-22T02:54:53.477Z","4.1.0":"2024-06-22T15:14:49.264Z"},"maintainers":[{"name":"bradpitcher","email":"unicordion@proton.me"}],"author":{"name":"Jonathan Law"},"repository":{"type":"git","url":"git+https://gitlab.com/bradpitcher/UnitTestSCAD.git"},"keywords":["unit","test","openscad"],"license":"MIT","homepage":"https://gitlab.com/bradpitcher/UnitTestSCAD","bugs":{"url":"https://gitlab.com/bradpitcher/UnitTestSCAD/-/issues"},"readme":"# ![UnitTestSCAD Logo](https://gitlab.com/bradpitcher/UnitTestSCAD/-/raw/main/assets/UnitTestSCAD-32.png)UnitTestSCAD\n\n![License](https://img.shields.io/npm/l/unittestscad.svg) [![NPM](https://img.shields.io/npm/v/@bradpitcher/unittestscad.svg)](https://www.npmjs.com/package/@bradpitcher/unittestscad) ![coverage](https://gitlab.com/bradpitcher/UnitTestSCAD/badges/main/coverage.svg?job=unit_test) [![Join the chat at https://gitter.im/UnitTestSCAD/Lobby](https://badges.gitter.im/UnitTestSCAD/Lobby.svg)](https://gitter.im/UnitTestSCAD/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n![UnitTestSCAD: expect(cube.scad).toBe(cube);](https://gitlab.com/bradpitcher/UnitTestSCAD/-/raw/main/assets/banner.png)\n\n# Unit Testing for OpenSCAD\n\nUnitTestSCAD brings forth unit testing capabilities to OpenSCAD. Unit testing enables you to check for regressions, accuracy and robustness of code in a fast, repeatable manner. Speed of development increases as unit tests will worry about your regressions, and allow you to plow ahead with your vision.\n\n# Contents\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n\n# Getting Started\n## Installing OpenSCAD\nUnitTestSCAD has a very strong dependency on OpenSCAD. This is because UnitTestSCAD uses some of the features from OpenSCAD to perform some of its underlying testing.\n\nSimply start by installing OpenSCAD if you have not done so already:\n\n[OpenSCAD Home](http://www.openscad.org/)\n\n## Adding OpenSCAD to PATH\nIn order for UnitTestSCAD to take advantage of OpenSCAD's features, the folder which contains the OpenSCAD files must be added to the PATH environment variable on your machine.\n\nWhile the path will generally be the same on all platforms (Windows, Linux, Mac), the file they point to specifically is different. If you have moved the respective file manually, you will need to point at:\n- Windows: `openscad.com`\n- Linux: `openscad.exe`\n- Mac: `openscad.exe`\n\nThese files will be in the location where you installed OpenSCAD. For example, by default on Windows: `C:/Program Files/OpenSCAD`.\n\nNote: **The path to the folder containing the files is to be added to the PATH environment variable.**\n\n## Installing NodeJS and NPM\nUnitTestSCAD is powered by NodeJS and distributed by NPM. They are distributed together and complement each other well.\nFollow the installation from the NodeJS website if you do not have these installed:\n\n[NodeJS Home](https://nodejs.org/en/)\n\n## Installing UnitTestSCAD\nIf all has gone well, then installing UnitTestSCAD will be a simple command to run in the command line/terminal.\n\nTo install UnitTestSCAD, run the command:\n\n`npm i unittestscad`\n\n# Usage\nUnitTestSCAD should be required as standard into a NodeJS script.\n\n```javascript\nconst UnitTestSCAD = require('unittestscad');\n```\n\n`UnitTestSCAD` exposes several classes designed to enable assertions on your `.scad` functions and modules. For example, to assert against a `.scad` file which produces a 3d model (`my3dmodel.scad`), you can create it as such:\n\n```javascript\nconst my3dmodel = new UnitTestSCAD.ThreeDModule({\n  include: ['my3dmodel.scad'],\n  variables: {\n    points: '[[0, 0], [1,1]]',\n    range: '[0 : 20 : 80]',\n    width: 5.56,\n    text: '\"some text\"',\n    withExtension: true,\n    $fn: 100,\n  }\n});\n\nexpect(my3dmodel.width).toBe(5.56);\n```\n\n# API Reference\nSee [API Documentation](https://bradpitcher.gitlab.io/UnitTestSCAD/) for more details.\n","readmeFilename":"README.md"}