Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[wip] Tests

  • Loading branch information...
commit c0037924787c1778d57479e7514c94021637a38e 1 parent 90c4535
@filipediasferreira filipediasferreira authored
Showing with 19 additions and 42 deletions.
  1. +2 −40 test/tasks/init.js
  2. +17 −2 test/tasks/symlink.js
View
42 test/tasks/init.js
@@ -1,46 +1,8 @@
-var expect = require('expect.js'),
- isFile = require('../helpers/util/is-file')
+var expect = require('expect.js')
;
module.exports = function (automaton) {
describe('init', function () {
- it('should initialize an empty task - with default autofile name', function (done) {
- var dir = __dirname + '/../tmp/init/',
- filename = 'autofile.js';
-
- automaton.run('init', {
- dst: dir
- }, function (err) {
- if (err) {
- return done(err);
- }
-
- expect(isFile(dir + filename)).to.be(true);
- done();
- });
-
- });
-
- it('should initialize an empty task - with specific autofile name', function (done) {
- var dir = __dirname + '/../tmp/init/',
- file = 'autofile_test.js';
-
- automaton.run('init', {
- name: file,
- dst: dir
- }, function (err) {
- if (err) {
- return done(err);
- }
-
- expect(isFile(dir + file)).to.be(true);
- done();
- });
-
- });
-
- it.skip('should throw an error if the autofile already exists', function () {
- // test with dst and withouy dstß
- });
+ it.skip('should initialize an empty task');
});
};
View
19 test/tasks/symlink.js
@@ -1,8 +1,23 @@
-var expect = require('expect.js')
+var expect = require('expect.js'),
+ isFile = require('../helpers/util/is-file')
;
module.exports = function (automaton) {
describe('symlink', function () {
- it.skip('should create symlink');
+ it.skip('should create symlink', function (done) {
+
+ var dir = __dirname + '/../tmp/init/',
+ filename = 'autofile.js';
+
+ automaton.run('symlink', {
+ }, function (err) {
+ if (err) {
+ return done(err);
+ }
+
+ expect(isFile(dir + filename)).to.be(true);
+ done();
+ });
+ });
});
};
Please sign in to comment.
Something went wrong with that request. Please try again.