Closed paul90 closed 9 years ago
Thanks for the pointer. We should review all routing after the conversion.
The current state is available in the paul90/express4 branch
npm test
is still broken, failing in test/server.coffee - but differently than in #60. It appears that there is a problem getting the callback. I don't see this method of testing documented anywhere, so not sure if it is something is intended to work or was an undocumented feature that is no longer there.
server
#actionCB()
[ { data: '/tmp/sfwtests/5a53e6b040c032d7',
port: 55555,
root: '/Users/Paul/Projects/FedWiki/wiki-node-server/lib',
packageDir: '/Users/Paul/Projects/FedWiki/wiki-node-server',
farmPort: 40000,
home: 'welcome-visitors',
client: '/Users/Paul/Projects/FedWiki/wiki-node-server/wiki-client/client',
db: '/tmp/sfwtests/5a53e6b040c032d7/pages',
status: '/tmp/sfwtests/5a53e6b040c032d7/status',
url: 'http://localhost:55555',
id: '/tmp/sfwtests/5a53e6b040c032d7/status/persona.identity',
database: { type: './page' },
debug: true } ]
( (
`)
________・•.
| |] ・
\ / ❛
`----' ・❛●•・
❛●•・Coffee-Trace
CoffeeScript: /Users/Paul/Projects/FedWiki/wiki-node-server/test/server.coffee:5
2: path = require 'path'
3: random = require '../lib/random_id'
4: testid = random()
✘ 5: argv = require('../lib/defaultargs.coffee')({data: path.join('/tmp', 'sfwtests', testid), port: 55555})
6:
7: describe 'server', ->
8: describe '#actionCB()', ->
Javascript: /Users/Paul/Projects/FedWiki/wiki-node-server/test/server.coffee:14:39
11:
12: argv = require('../lib/defaultargs.coffee')({
13: data: path.join('/tmp', 'sfwtests',⬇testid),
✘ 14: port: 55555
15: });
16:
17: describe('server', function() {
TypeError: Cannot read property 'put' of undefined
at Function.<anonymous> (/Users/Paul/Projects/FedWiki/wiki-node-server/test/server.js:14:39)
at Function.g (events.js:180:16)
at Function.emit (events.js:92:17)
at Server.<anonymous> (/Users/Paul/Projects/FedWiki/wiki-node-server/lib/server.coffee:509:11)
at Server.g (events.js:180:16)
at Server.emit (events.js:92:17)
at net.js:1055:10
at process._tickCallback (node.js:419:13)
The Express4 changes have been merged into the paul90/0.3.x branch.
There are some messages about depreciated calls, which will be tided up soon - they appear to be for calls that will be removed in Express5.
As far as I can tell, the Express 4 version is working, as expected, so I'm closing this issue.
Another overdue update.
The Express 3.x to 4.x migration guide has been updated.