Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions ruben/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const mocha = require('gulp-mocha');

gulp.task('lint', () => {
gulp.src('./name.js')
.pipe(eslint({
"ecmaVersion": 6
}))
.pipe(eslint.format());
});

gulp.task('default', function () {
gulp.src('test/test.js')
// gulp-mocha needs filepaths so you can't have any plugins before it
.pipe(mocha());
});
1 change: 1 addition & 0 deletions ruben/myName.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// module.exports.name = 'Ruben';
7 changes: 7 additions & 0 deletions ruben/name.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

const greet = module.exports = function() {
return `HI ${process.argv[2] || 'Ruben'}`;
};

console.log(greet());
153 changes: 153 additions & 0 deletions ruben/npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
0 info it worked if it ends with ok
1 verbose cli [ '/Users/Sarkisyan/.node/bin/node',
1 verbose cli '/Users/Sarkisyan/.node/bin/npm',
1 verbose cli 'i',
1 verbose cli 'chai' ]
2 info using npm@2.15.1
3 info using node@v4.4.3
4 verbose install initial load of /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/package.json
5 verbose readDependencies loading dependencies from /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/package.json
6 silly cache add args [ 'chai', null ]
7 verbose cache add spec chai
8 silly cache add parsed spec Result {
8 silly cache add raw: 'chai',
8 silly cache add scope: null,
8 silly cache add name: 'chai',
8 silly cache add rawSpec: '',
8 silly cache add spec: 'latest',
8 silly cache add type: 'tag' }
9 silly addNamed chai@latest
10 verbose addNamed "latest" is being treated as a dist-tag for chai
11 info addNameTag [ 'chai', 'latest' ]
12 silly mapToRegistry name chai
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry data Result {
15 silly mapToRegistry raw: 'chai',
15 silly mapToRegistry scope: null,
15 silly mapToRegistry name: 'chai',
15 silly mapToRegistry rawSpec: '',
15 silly mapToRegistry spec: 'latest',
15 silly mapToRegistry type: 'tag' }
16 silly mapToRegistry uri https://registry.npmjs.org/chai
17 verbose addNameTag registry:https://registry.npmjs.org/chai not in flight; fetching
18 verbose request uri https://registry.npmjs.org/chai
19 verbose request no auth needed
20 info attempt registry request try #1 at 11:27:40
21 verbose request id bf4a284cb6f911d9
22 verbose etag "DTT74GEA46VK22T212QB3HP8J"
23 http request GET https://registry.npmjs.org/chai
24 http 304 https://registry.npmjs.org/chai
25 verbose headers { date: 'Tue, 10 May 2016 18:27:40 GMT',
25 verbose headers via: '1.1 varnish',
25 verbose headers 'cache-control': 'max-age=300',
25 verbose headers etag: '"DTT74GEA46VK22T212QB3HP8J"',
25 verbose headers age: '179',
25 verbose headers connection: 'keep-alive',
25 verbose headers 'x-served-by': 'cache-ord1746-ORD',
25 verbose headers 'x-cache': 'HIT',
25 verbose headers 'x-cache-hits': '4',
25 verbose headers 'x-timer': 'S1462904860.182716,VS0,VE0',
25 verbose headers vary: 'Accept-Encoding' }
26 silly get cb [ 304,
26 silly get { date: 'Tue, 10 May 2016 18:27:40 GMT',
26 silly get via: '1.1 varnish',
26 silly get 'cache-control': 'max-age=300',
26 silly get etag: '"DTT74GEA46VK22T212QB3HP8J"',
26 silly get age: '179',
26 silly get connection: 'keep-alive',
26 silly get 'x-served-by': 'cache-ord1746-ORD',
26 silly get 'x-cache': 'HIT',
26 silly get 'x-cache-hits': '4',
26 silly get 'x-timer': 'S1462904860.182716,VS0,VE0',
26 silly get vary: 'Accept-Encoding' } ]
27 verbose etag https://registry.npmjs.org/chai from cache
28 verbose get saving chai to /Users/Sarkisyan/.npm/registry.npmjs.org/chai/.cache.json
29 verbose correctMkdir /Users/Sarkisyan/.npm correctMkdir not in flight; initializing
30 silly addNameTag next cb for chai with tag latest
31 silly addNamed chai@3.5.0
32 verbose addNamed "3.5.0" is a plain semver version for chai
33 silly cache afterAdd chai@3.5.0
34 verbose afterAdd /Users/Sarkisyan/.npm/chai/3.5.0/package/package.json not in flight; writing
35 verbose correctMkdir /Users/Sarkisyan/.npm correctMkdir not in flight; initializing
36 verbose afterAdd /Users/Sarkisyan/.npm/chai/3.5.0/package/package.json written
37 silly install resolved [ { author: { name: 'Jake Luer', email: 'jake@alogicalparadox.com' },
37 silly install resolved name: 'chai',
37 silly install resolved description: 'BDD/TDD assertion library for node.js and the browser. Test framework agnostic.',
37 silly install resolved keywords: [ 'test', 'assertion', 'assert', 'testing', 'chai' ],
37 silly install resolved homepage: 'http://chaijs.com',
37 silly install resolved license: 'MIT',
37 silly install resolved contributors: [ [Object], [Object], [Object], [Object] ],
37 silly install resolved version: '3.5.0',
37 silly install resolved repository: { type: 'git', url: 'git+https://github.com/chaijs/chai.git' },
37 silly install resolved bugs: { url: 'https://github.com/chaijs/chai/issues' },
37 silly install resolved main: './index',
37 silly install resolved scripts: { test: 'make test' },
37 silly install resolved engines: { node: '>= 0.4.0' },
37 silly install resolved dependencies:
37 silly install resolved { 'assertion-error': '^1.0.1',
37 silly install resolved 'deep-eql': '^0.1.3',
37 silly install resolved 'type-detect': '^1.0.0' },
37 silly install resolved devDependencies:
37 silly install resolved { browserify: '^10.2.1',
37 silly install resolved 'bump-cli': '^1.1.3',
37 silly install resolved karma: '^0.13.16',
37 silly install resolved 'karma-mocha': '^0.1.10',
37 silly install resolved 'karma-sauce-launcher': '^0.2.11',
37 silly install resolved 'karma-phantomjs-launcher': '^0.2.0',
37 silly install resolved 'karma-firefox-launcher': '^0.1.6',
37 silly install resolved mocha: '^2.2.5',
37 silly install resolved istanbul: '^0.3.14' },
37 silly install resolved gitHead: '4ca0218391cf947c6cfac2d1a7424a63a4b4c232',
37 silly install resolved _id: 'chai@3.5.0',
37 silly install resolved _shasum: '4d02637b067fe958bdbfdd3a40ec56fef7373247',
37 silly install resolved _from: 'chai@latest',
37 silly install resolved _npmVersion: '3.3.12',
37 silly install resolved _nodeVersion: '5.5.0',
37 silly install resolved _npmUser: { name: 'chaijs', email: 'chaijs@keithcirkel.co.uk' },
37 silly install resolved dist:
37 silly install resolved { shasum: '4d02637b067fe958bdbfdd3a40ec56fef7373247',
37 silly install resolved tarball: 'https://registry.npmjs.org/chai/-/chai-3.5.0.tgz' },
37 silly install resolved maintainers: [ [Object], [Object] ],
37 silly install resolved directories: {},
37 silly install resolved _resolved: 'https://registry.npmjs.org/chai/-/chai-3.5.0.tgz',
37 silly install resolved readme: 'ERROR: No README data found!' } ]
38 info install chai@3.5.0 into /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben
39 info installOne chai@3.5.0
40 verbose installOne of chai to /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben not in flight; installing
41 verbose correctMkdir /Users/Sarkisyan/.npm/_locks correctMkdir not in flight; initializing
42 verbose lock using /Users/Sarkisyan/.npm/_locks/chai-14003c9c26d06ffc.lock for /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai
43 silly install write writing chai 3.5.0 to /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai
44 verbose unbuild node_modules/chai
45 silly gentlyRm /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai is being purged from base /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben
46 verbose gentlyRm don't care about contents; nuking /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai
47 silly vacuum-fs Error: ENOTDIR: not a directory, lstat '/Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai'
47 silly vacuum-fs at Error (native)
48 verbose unlock done using /Users/Sarkisyan/.npm/_locks/chai-14003c9c26d06ffc.lock for /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai
49 verbose stack Error: ENOTDIR: not a directory, lstat '/Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai'
49 verbose stack at Error (native)
50 verbose cwd /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben
51 error Darwin 15.4.0
52 error argv "/Users/Sarkisyan/.node/bin/node" "/Users/Sarkisyan/.node/bin/npm" "i" "chai"
53 error node v4.4.3
54 error npm v2.15.1
55 error path /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai
56 error code ENOTDIR
57 error errno -20
58 error syscall lstat
59 error ENOTDIR: not a directory, lstat '/Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai'
60 error If you need help, you may report this error at:
60 error <https://github.com/npm/npm/issues>
61 verbose exit [ -20, true ]
62 verbose unbuild node_modules/chai
63 silly gentlyRm /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai is being purged from base /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben
64 verbose gentlyRm don't care about contents; nuking /Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai
65 silly vacuum-fs Error: ENOTDIR: not a directory, lstat '/Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai'
65 silly vacuum-fs at Error (native)
66 error error rolling back Error: ENOTDIR: not a directory, lstat '/Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai'
66 error error rolling back at Error (native)
66 error error rolling back { [Error: ENOTDIR: not a directory, lstat '/Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai']
66 error error rolling back errno: -20,
66 error error rolling back code: 'ENOTDIR',
66 error error rolling back syscall: 'lstat',
66 error error rolling back path: '/Users/Sarkisyan/Desktop/401/simple_modular_patterns_and_tests/ruben/node_modules/chai' }
34 changes: 34 additions & 0 deletions ruben/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "simple_modular_patterns_and_tests",
"version": "1.0.0",
"description": "##To Submit this Assignment * fork this repository * write all of your code in a folder containing your name * push to your repository * submit a pull request to this repository * submit a link to your PR in canvas",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rubens23/simple_modular_patterns_and_tests.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/rubens23/simple_modular_patterns_and_tests/issues"
},
"homepage": "https://github.com/rubens23/simple_modular_patterns_and_tests#readme",
"devDependencies": {
"chai": "^3.5.0",
"eslint": "^2.9.0",
"eslint-config-google": "^0.5.0",
"eslint-config-standard": "^5.3.1",
"eslint-plugin-promise": "^1.1.0",
"eslint-plugin-standard": "^1.3.2",
"gulp": "^3.9.1",
"gulp-eslint": "^2.0.0",
"gulp-mocha": "^2.2.0",
"mocha": "^2.4.5"
},
"dependencies": {
"lodash": "^4.12.0"
}
}
9 changes: 9 additions & 0 deletions ruben/test/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict'
const expect = require('chai').expect;
const greet = require('../name');

describe('Assignment test', () => {
it('should have the correct name', () => {
expect(greet()).to.eql('HI Ruben')
});
})