diff --git a/package.json b/package.json index 1eb72583a..f0ff2a309 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "lint:dry": "eslint **/*.{js,jsx}", "circleci": "npm test && eslint **/*.{js,jsx} --max-warnings=0", "verify": "npm run lint && npm test", - "test": "pico-check", - "test:dev": "pico-check -v -w", + "test": "jest", + "test:dev": "jest --verbose --watch", "phb": "node scripts/phb.js", "prod": "set NODE_ENV=production && npm run build", "postinstall": "npm run buildall", @@ -30,8 +30,11 @@ "eslintIgnore": [ "build/*" ], - "pico-check": { - "require": "./tests/test.init.js" + "jest": { + "modulePaths": [ + "mode_modules", + "shared" + ] }, "babel": { "presets": [ @@ -79,6 +82,6 @@ "devDependencies": { "eslint": "^8.5.0", "eslint-plugin-react": "^7.28.0", - "pico-check": "^2.2.0" + "jest": "^27.4.5" } } diff --git a/tests/basic.test.js b/tests/basic.test.js deleted file mode 100644 index 881f2b172..000000000 --- a/tests/basic.test.js +++ /dev/null @@ -1,7 +0,0 @@ -const test = require('pico-check'); - -test('Just setting up a spot for future tests', (t)=>{ - t.pass(); -}); - -module.exports = test; \ No newline at end of file diff --git a/tests/markdown.test.js b/tests/markdown.test.js new file mode 100644 index 000000000..e2c244338 --- /dev/null +++ b/tests/markdown.test.js @@ -0,0 +1,13 @@ +const Markdown = require('naturalcrit/markdown.js'); + +test('Escapes '; + const rendered = Markdown.render(source); + expect(rendered).toMatch('<script></script>'); +}); + +test('Processes the markdown within an HTML block if its just a class wrapper', function() { + const source = '
Bold text
\n