1.0.0 • Published 9 months ago

@dev-geos/mod-jest v1.0.0

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
9 months ago

HOW TO USE

1. Install from npm

npm install @dev-geos/mod-jest

2. 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

It'all. Thanks !

1.0.0

9 months ago