mirror of
https://github.com/xuxiaobo-bobo/boda_jsEnv.git
synced 2025-04-23 04:04:25 +08:00
19 lines
381 B
JavaScript
19 lines
381 B
JavaScript
|
|
const tx2 = require('..')
|
|
const should = require('should')
|
|
|
|
describe('Action', function() {
|
|
it('should notify about new action', (done) => {
|
|
tx2.once('data', (dt) => {
|
|
should(dt.type).eql('axm:action')
|
|
should(dt.data.action_name).eql('something special')
|
|
done()
|
|
})
|
|
|
|
tx2.action('something special', (cb) => {
|
|
cb({sucess:true})
|
|
})
|
|
})
|
|
|
|
})
|