Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Tests for all core libraries, plus basic sanity test. #6

Open
cliftonc opened this Issue · 20 comments

4 participants

@cliftonc
Owner

Create tests for all core libraries, need to create second issue to create a web based module to run the tests - especially enabling test execution for modules.

@cliftonc
Owner

Sanity test written, can be run to make sure that a change doesn't break anything fundamental, but is an outside in test only.

@cliftonc
Owner

Tests for Menu written.

@coleGillespie

do you have any ideas on which test framework you would like to see implemented?

@cliftonc
Owner

Mocha? It looks quite good.

@richtera richtera referenced this issue from a commit in richtera/calipso
@richtera richtera Fix mime lookup for /asset retrieve unfuddle #6. 81f3edd
@LarryEitel

Trying to run 'sanity test' using mocha per reference in package.js:

NODE_ENV=mocha mocha --reporter spec -t 5000 -s 500

It returns:

calipso.logging.configureLogging(loggingConfig);
                ^
TypeError: Object #<Object> has no method 'configureLogging'
@richtera
Collaborator
@LarryEitel

got same response :S
I'm on ubuntu server (latest)

@richtera
Collaborator
@LarryEitel

Thanks for reply. I reinstalled from repo with no complaints. App launches fine too. However, I get same error with trying to run tests using: npm test.

Enjoy your vacation. :)

@LarryEitel

FYI, test is complaining about missing should. Adding it however, doesn't resolve this issue.

@richtera
Collaborator
@LarryEitel

Here is a link to pastebin of test run on cloned repo of tower: http://pastebin.com/pwXvAsRQ

My related problem was in fact cause I was running a test on a new site. I WOULD like to see a test of generated new site, albeit simple. I and likely others would then extend from there. Actually, the core models could/should be testable. Also would serve as example for new custom models.

A Thanks to all who have contributed to this project!

@richtera
Collaborator
@LarryEitel

git clone https://github.com/cliftonc/calipso.git
cd calipso/
sudo npm install -d
npm test

returns:

> calipso@0.3.4 test /home/larry/_of/_prjs/calipso
> NODE_ENV=mocha mocha --reporter spec -t 5000 -s 500


/home/larry/_of/_prjs/calipso/test/helpers/calipsoHelper.js:98
calipso.logging.configureLogging(loggingConfig);
                ^
TypeError: Object #<Object> has no method 'configureLogging'
    at Object.<anonymous> (/home/larry/_of/_prjs/calipso/test/helpers/calipsoHelper.js:98:17)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/larry/_of/_prjs/calipso/test/lib.core.menu.js:7:21)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Mocha.loadFiles (/home/larry/_of/_prjs/calipso/node_modules/mocha/lib/mocha.js:126:27)
    at Array.forEach (native)
    at Mocha.loadFiles (/home/larry/_of/_prjs/calipso/node_modules/mocha/lib/mocha.js:123:14)
    at Mocha.run (/home/larry/_of/_prjs/calipso/node_modules/mocha/lib/mocha.js:229:8)
    at Object.<anonymous> (/home/larry/_of/_prjs/calipso/node_modules/mocha/bin/_mocha:324:7)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0
@richtera
Collaborator
@LarryEitel

Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
npm: 1.1.48
node: 0.8.6

@richtera
Collaborator
@richtera
Collaborator
@richtera
Collaborator
@richtera
Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.