https://github.com/mickaelandrieu/nfluentjs
**NOT MAINTAINED** TDD library inspired by NFluent. Based on phantomjs, casperjs and Vigojs
https://github.com/mickaelandrieu/nfluentjs
Last synced: 7 months ago
JSON representation
**NOT MAINTAINED** TDD library inspired by NFluent. Based on phantomjs, casperjs and Vigojs
- Host: GitHub
- URL: https://github.com/mickaelandrieu/nfluentjs
- Owner: mickaelandrieu
- License: mit
- Created: 2014-02-17T18:35:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-06-30T20:33:49.000Z (over 9 years ago)
- Last Synced: 2025-02-03T22:38:30.773Z (8 months ago)
- Language: JavaScript
- Homepage: http://mickaelandrieu.github.io/NFluentjs/
- Size: 446 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NFluentJS
> **THIS PACKAGE IS NOT MAINTAINED ANYMORE, FORK IT IF YOU NEED IT**
>**Important note:** the `master` branch is still on WIP. You should never ever think to use NFluentjs
in production
>
>[Travis-CI](http://travis-ci.org/mickaelandrieu/NFluentjs) build status:
>
>-  `master` branch
>- tests have to be run manually using the `nfluentjs --selftest` commandNFluentJS is a CLI-tool based on [CasperJS](http://www.casperjs.org/)
and [VigoJS](http://slimerjs.org/).It aims to provide some beautiful TDD assertions in Javascript for unit and fonctional testing.
## Installation
First [install CasperJS](http://docs.casperjs.org/en/latest/installation.html), we'll use 1.1 beta-3 here
and his dependencies (at this point, only [PhantomJS](http://www.phantomjs.org/) is required)For now, we have only one way to install NFluentjs.
### From the master branch
```shell
$ git clone git://github.com/mickaelandrieu/NFluentjs.git
$ cd NFluentjs
$ ln -sf `pwd`/bin/nfluentjs /usr/local/bin/nfluentjs
```Once PhantomJS and CasperJS installed on your machine, you should obtain something like this:
```shell
$ phantomjs --version
1.9.2
$ casperjs
CasperJS version 1.1.0-DEV at /Users/niko/Sites/casperjs, using phantomjs version 1.9.2
# ...
$ nfluentjs
NFluentjs version 0.0.1-DEV
```### How it works ?
```javascript
/* For more complete samples, see the VigoJs documentation and use cases */var DummyTest = function(nfluentInstance){
this.title = 'This is a Dummy Test';
this.description = 'This is a Dummy description';
this.Check = nfluentInstance.test;
};DummyTest.prototype.launchTest = function launchTest() {
var string = new String('lol');
this.Check.That(string).IsInstanceOf(String);
};DummyTest.prototype.getUrl = function getUrl() {
return false;
}DummyTest.prototype.setTest = function setTest(testerInstance) {
this.test = testerInstance;return this;
}exports.create = function create(nfluentInstance, config, properties) {
return new DummyTest(nfluentInstance, config, properties);
};
```## License
MIT