Spaces:
Sleeping
Sleeping
Download src/putility/test/event.test.js from AZILS/puter-deploy: direct link, hf CLI and curl.
- Browser
- Download file 392 Bytes
-
https://huggingface.co/spaces/AZILS/puter-deploy/resolve/main/src/putility/test/event.test.js
- Command line
-
hf download hf://spaces/AZILS/puter-deploy/src/putility/test/event.test.js
-
curl -L -o event.test.js https://huggingface.co/spaces/AZILS/puter-deploy/resolve/main/src/putility/test/event.test.js
392 Bytes
| const { Emitter } = require('../src/libs/event'); | |
| const { expect } = require('chai'); | |
| describe('Emitter', () => { | |
| it('has EmitterFeature installed', async () => { | |
| const em = new Emitter(); | |
| let value = false; | |
| em.on('test', () => { | |
| value = true; | |
| }); | |
| await em.emit('test'); | |
| expect(value).to.equal(true); | |
| }); | |
| }); | |