Tag: 节点点击

如何在node-tap中使用beforeEach?

有人可以提供一个关于如何使用beforeEach吗? http://www.node-tap.org/api/理想情况下,承诺版本的一个例子,但callback版本的例子也不错。 这是我创build的一个testing工作正常的testing: 'use strict'; const t = require('tap'); const tp = require('tapromise'); const app = require('../../../server/server'); const Team = app.models.Team; t.test('crupdate', t => { t = tp(t); const existingId = '123'; const existingData = {externalId: existingId, botId: 'b123'}; const existingTeam = Team.create(existingData); return existingTeam.then(() => { stubCreate(); const newId = 'not 123' const newData […]