UNPKG

lazo-next

Version:

A client-server web framework built on Node.js that allows front-end developers to easily create a 100% SEO compliant, component MVC structured web application with an optimized first page load.

35 lines (31 loc) 1.01 kB
define([ 'intern!bdd', 'intern/chai!', 'intern/chai!expect', 'sinon', 'sinon-chai', 'test/unit/utils', 'context' ], function (bdd, chai, expect, sinon, sinonChai, utils, Context) { chai.use(sinonChai); with (bdd) { describe('Context', function () { it('common client', function () { var ctx = new Context({ _request: { url: { pathname: 'foo/bar/baz' }, raw: { // this is expected on the server req: { headers: {} } } } }); // this will be equal to whatever the clients path is when phantom runs or the file is opened in the browser chai.expect(ctx.location.pathname).to.not.be.equal('foo/bar/baz'); }); }); } });