@dev-geos/mod-jest
v1.0.0
Published
It is a JavaScript testing framework inspired by Jest. Very lightweight, it's streamlined to run quickly in the console with colorful results. It works in frontend with of any framework and projects using: django, laravel, React, TypeScript, Node, Angula
Readme
HOW TO USE
1. Install from npm
npm install @dev-geos/mod-jest2. Import and Use it
import { describe, test, expect } from '@dev-geos/mod-jest'
// Test de la fonction init()
describe('init()', () => {
test('DIV Exists', () => {
var res = false
var div = document.querySelectorAll('.div')
if (div) res = true
expect(res).toBe(true); // selon le comportement attendu
})
})3. Result in console
(Refresh your webpage)
************************************************* ...
[ Test 1 : init() ]
✔ DIV Exists
