└── test ├── fixtures ├── require.coffee ├── require_markdown.md ├── require.es6 ├── require.js ├── bower.json ├── composer.json ├── package.json ├── gist.html ├── require_markdown.md.html ├── require.coffee.html ├── require.es6.html ├── require.js.html └── bower.json.html ├── test_spy.js ├── test_core.js ├── test_require_markdown.js ├── test_gist.js ├── update_fixtures.sh ├── test_require_coffee.js ├── test_require_markdown_pull.js ├── helper.js ├── test_require_es6.js ├── test_require_pull.js ├── test_require.js ├── test_live-resover.js ├── test_manifest_bower.js ├── test_utils.js ├── test_manifest_composer.js └── test_manifest_package.js /test/fixtures/require.coffee: -------------------------------------------------------------------------------- 1 | require "path" 2 | lodash = require("lodash") 3 | -------------------------------------------------------------------------------- /test/fixtures/require_markdown.md: -------------------------------------------------------------------------------- 1 | 2 | ```js 3 | require('lodash'); 4 | ``` 5 | -------------------------------------------------------------------------------- /test/fixtures/require.es6: -------------------------------------------------------------------------------- 1 | import "path"; 2 | import lodash from "lodash"; 3 | import * as dash from "lodash"; 4 | import exp, {pick, omit} from "lodash"; 5 | export * from "url"; 6 | -------------------------------------------------------------------------------- /test/test_spy.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var helper = require('./helper'); 5 | 6 | describe('spyInject', function() { 7 | 8 | this.timeout(4000); 9 | 10 | before(function(done) { 11 | this.$ = this.result = null; 12 | 13 | helper('bower.json', done); 14 | }); 15 | 16 | it('dom element is present', function() { 17 | $('#js-repo-pjax-container').length.should.equal(1); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /test/test_core.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var core = require('..'); 5 | 6 | describe('core', function() { 7 | var fakeWindow = { 8 | document: { 9 | getElementById: function() {} 10 | } 11 | }; 12 | 13 | it('require argument window', function () { 14 | core.bind(null).should.throw('Missing argument window'); 15 | }); 16 | 17 | it('require option changelog', function () { 18 | core.bind(null, fakeWindow, {version: '1.2.3'}).should.throw('Missing option changelog'); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /test/fixtures/require.js: -------------------------------------------------------------------------------- 1 | 2 | require('path'); 3 | require('lodash'); 4 | require('unknown-package-name'); 5 | require('./file.js'); 6 | require('./folder/file.js'); 7 | require('./file-or-folder'); 8 | require('../file.js'); 9 | require('../folder/file.js'); 10 | require('../file-or-folder'); 11 | require('../../file.js'); 12 | require('../../folder/file.js'); 13 | require('../../file-or-folder'); 14 | require('./'); 15 | require('..'); 16 | require('../'); 17 | require('../..'); 18 | require('../../'); 19 | require('.'); 20 | require('...'); 21 | require('/'); 22 | require('matthewmueller/uid'); 23 | require('component/tip@master'); 24 | require('yields/shortcuts@0.0.1:/index.js'); 25 | -------------------------------------------------------------------------------- /test/fixtures/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "playground-repo", 3 | "description": "My personal playground", 4 | "version": "0.0.1", 5 | "main": "index.js", 6 | "license": "MIT", 7 | "ignore": "", 8 | "keywords": [], 9 | "author": [ 10 | "Stefan Buck (http://stefanbuck.com)" 11 | ], 12 | "homepage": "https://github.com/stefanbuck/playground-repo", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/stefanbuck/playground-repo" 16 | }, 17 | "dependencies": { 18 | "lodash": "2.4.1", 19 | "modernizr": "Modernizr/Modernizr", 20 | "backbone": "jashkenas/backbone#master", 21 | "jquery": "jquery/jquery#1.x-master", 22 | "unknown-package-name": "latest" 23 | }, 24 | "devDependencies": { 25 | "chai": "^1.9.1", 26 | "should": "^3.3.1" 27 | }, 28 | "resolutions": { 29 | "lodash": "2.1.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /test/test_require_markdown.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | 7 | describe('require_markdown.md', function() { 8 | 9 | this.timeout(4000); 10 | 11 | before(function(done) { 12 | helper('require_markdown.md', function(err, _result) { 13 | if (err) { 14 | return done(err); 15 | } 16 | this.result = _result.require; 17 | done(); 18 | }.bind(this)); 19 | }); 20 | 21 | it('found dependencies', function() { 22 | this.result.length.should.equal(1); 23 | }); 24 | 25 | it('check link replacement', function() { 26 | $('.octo-linker').length.should.equal(1); 27 | }); 28 | 29 | it('https://github.com/lodash/lodash', function() { 30 | var item = _.findWhere(this.result, { 31 | name: 'lodash' 32 | }); 33 | 34 | item.el.data('type').should.equal('npm'); 35 | item.el.data('value').should.equal('lodash'); 36 | }); 37 | 38 | }); 39 | -------------------------------------------------------------------------------- /test/test_gist.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | 7 | describe.skip('gist', function() { 8 | 9 | this.timeout(4000); 10 | 11 | before(function(done) { 12 | this.$ = this.result = null; 13 | 14 | helper('gist', 'https://gist.github.com/petereberlecom/a61cb95f9b28270d86a9', function(_jquery, _result) { 15 | this.$ = _jquery; 16 | this.result = _result.require; 17 | done(); 18 | }.bind(this)); 19 | }); 20 | 21 | it('found dependencies', function() { 22 | this.result.length.should.equal(1); 23 | }); 24 | 25 | it('https://github.com/octo-linker/core', function() { 26 | var item = _.findWhere(this.result, { 27 | name: 'octo-linker-core' 28 | }); 29 | 30 | item.link.should.equal('https://github.com/octo-linker/core'); 31 | 32 | item.el.attr('href').should.equal('https://github.com/octo-linker/core'); 33 | item.el.hasClass('tooltipped').should.be.false; 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /test/update_fixtures.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl https://github.com/octo-linker/core/blob/master/test/fixtures/bower.json > ./test/fixtures/bower.json.html 4 | curl https://github.com/octo-linker/core/blob/master/test/fixtures/composer.json > ./test/fixtures/composer.json.html 5 | curl https://github.com/octo-linker/core/blob/master/test/fixtures/package.json > ./test/fixtures/package.json.html 6 | curl https://github.com/octo-linker/core/blob/master/test/fixtures/require_markdown.md > ./test/fixtures/require_markdown.md.html 7 | curl https://github.com/octo-linker/core/blob/master/test/fixtures/require.coffee > ./test/fixtures/require.coffee.html 8 | curl https://github.com/octo-linker/core/blob/master/test/fixtures/require.js > ./test/fixtures/require.js.html 9 | 10 | curl https://gist.github.com/petereberlecom/a61cb95f9b28270d86a9 > ./test/fixtures/gist.html 11 | curl https://github.com/octo-linker/core/issues/10 > ./test/fixtures/require_issues.html 12 | curl https://github.com/octo-linker/core/pull/9/files > ./test/fixtures/require_pull.html 13 | -------------------------------------------------------------------------------- /test/test_require_coffee.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | 7 | describe('require.coffee', function() { 8 | 9 | this.timeout(4000); 10 | 11 | before(function(done) { 12 | helper('require.coffee', function(err, _result) { 13 | if (err) { 14 | return done(err); 15 | } 16 | this.result = _result.require; 17 | done(); 18 | }.bind(this)); 19 | }); 20 | 21 | it('found dependencies', function() { 22 | this.result.length.should.equal(2); 23 | }); 24 | 25 | it('http://iojs.org/api/path.html', function() { 26 | var item = _.findWhere(this.result, { 27 | name: 'path' 28 | }); 29 | 30 | item.el.data('type').should.equal('npm'); 31 | item.el.data('value').should.equal('path'); 32 | }); 33 | 34 | it('https://github.com/lodash/lodash', function() { 35 | var item = _.findWhere(this.result, { 36 | name: 'lodash' 37 | }); 38 | 39 | item.el.data('type').should.equal('npm'); 40 | item.el.data('value').should.equal('lodash'); 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /test/test_require_markdown_pull.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | 7 | describe.skip('require_markdown pull', function() { 8 | 9 | this.timeout(4000); 10 | 11 | before(function(done) { 12 | this.$ = this.result = null; 13 | 14 | helper('require_markdown_pull', 'pull/8/files', function(_jquery, _result) { 15 | this.$ = _jquery; 16 | this.result = _result; 17 | done(); 18 | }.bind(this)); 19 | }); 20 | 21 | it('found dependencies', function() { 22 | this.result.length.should.equal(1); 23 | }); 24 | 25 | it('check link replacement', function() { 26 | this.$('a.octo-linker').length.should.equal(1); 27 | }); 28 | 29 | it('https://github.com/lodash/lodash', function() { 30 | var item = _.findWhere(this.result, { 31 | name: 'lodash' 32 | }); 33 | 34 | item.link.should.equal('https://github.com/lodash/lodash'); 35 | 36 | item.el.attr('href').should.equal('https://github.com/lodash/lodash'); 37 | item.el.hasClass('tooltipped').should.be.false; 38 | }); 39 | 40 | }); 41 | -------------------------------------------------------------------------------- /test/fixtures/composer.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "playground-repo", 4 | "description": "My personal playground", 5 | "version": "0.0.1", 6 | "type": "library", 7 | "keywords": [], 8 | "homepage": "https://github.com/stefanbuck/playground-repo", 9 | "time": "2014-09-19", 10 | "license": "MIT", 11 | "authors": [ 12 | { 13 | "name": "Stefan Buck", 14 | "email": "dev@stefanbuck.com", 15 | "homepage": "http://stefanbuck.com", 16 | "role": "Developer" 17 | } 18 | ], 19 | "support": { 20 | "email": "dev@stefanbuck.com", 21 | "irc": "irc://irc.freenode.org/composer" 22 | }, 23 | "require": { 24 | "php": ">=5.3.2", 25 | "laravel/framework": "~4.2", 26 | "unknown-package-name": "*" 27 | }, 28 | "require-dev": { 29 | "phpunit/phpunit": "~4.0", 30 | "doctrine/dbal": "~2.3" 31 | }, 32 | "conflict": {}, 33 | "replace": {}, 34 | "provide": {}, 35 | "suggest'": { 36 | "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", 37 | "doctrine/dbal": "Load information from the database about models for phpdocs (~2.3)" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/helper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var util = require('util'); 4 | var fs = require('fs'); 5 | var path = require('path'); 6 | var env = require('jsdom').env; 7 | var core = require('..'); 8 | 9 | module.exports = function(file, url, done) { 10 | var content, baseUrl, filePath; 11 | baseUrl = 'https://github.com/octo-linker/core/'; 12 | 13 | if (typeof url === 'function') { 14 | done = url; 15 | url = baseUrl + 'blob/master/test/fixtures/' + file; 16 | } 17 | 18 | if (process.env.TEST_ENV === 'remote') { 19 | content = url; 20 | console.log(' remote tests'); 21 | } else { 22 | console.log(' local tests'); 23 | filePath = util.format('./fixtures/%s.html', file); 24 | filePath = path.resolve(__dirname, filePath); 25 | content = fs.readFileSync(filePath, 'utf-8'); 26 | } 27 | 28 | env(content, function(err, window) { 29 | if (err) { 30 | return done(err); 31 | } 32 | global.$ = require('jquery')(window); 33 | 34 | if (process.env.TEST_ENV !== 'remote') { 35 | window.document.location.href = url; 36 | } 37 | 38 | var options = { 39 | showUpdateNotification: false, 40 | changelog: 'https://github.com/octo-linker/chrome-extension/releases', 41 | version: '4.0.0' 42 | }; 43 | 44 | core(window, options, done); 45 | }); 46 | }; 47 | -------------------------------------------------------------------------------- /test/test_require_es6.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | 7 | describe('require.es6', function() { 8 | 9 | this.timeout(4000); 10 | 11 | before(function(done) { 12 | helper('require.es6', function(err, _result) { 13 | if (err) { 14 | return done(err); 15 | } 16 | this.result = _result.require; 17 | done(); 18 | }.bind(this)); 19 | }); 20 | 21 | it('found dependencies', function() { 22 | this.result.length.should.equal(5); 23 | }); 24 | 25 | it('http://iojs.org/api/path.html', function() { 26 | var item = _.findWhere(this.result, { 27 | name: 'path' 28 | }); 29 | 30 | item.el.data('type').should.equal('npm'); 31 | item.el.data('value').should.equal('path'); 32 | }); 33 | 34 | it('https://github.com/lodash/lodash', function() { 35 | var item = _.findWhere(this.result, { 36 | name: 'lodash' 37 | }); 38 | 39 | item.el.data('type').should.equal('npm'); 40 | item.el.data('value').should.equal('lodash'); 41 | }); 42 | 43 | it('http://iojs.org/api/url.html', function() { 44 | var item = _.findWhere(this.result, { 45 | name: 'url' 46 | }); 47 | 48 | item.el.data('type').should.equal('npm'); 49 | item.el.data('value').should.equal('url'); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /test/test_require_pull.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | 7 | describe.skip('require pull', function() { 8 | 9 | this.timeout(4000); 10 | 11 | before(function(done) { 12 | this.$ = this.result = null; 13 | 14 | helper('require_pull', 'pull/9/files', function(_jquery, _result) { 15 | this.$ = _jquery; 16 | this.result = _result; 17 | done(); 18 | }.bind(this)); 19 | }); 20 | 21 | it('found dependencies', function() { 22 | // TODO Evaluate why this doesn't work 23 | // result.should.have.length(2); 24 | this.result.length.should.equal(2); 25 | }); 26 | 27 | it('http://iojs.org/api/path.html', function() { 28 | var item = _.findWhere(this.result, { 29 | name: 'path' 30 | }); 31 | 32 | item.link.should.equal('http://iojs.org/api/path.html'); 33 | 34 | item.el.attr('href').should.equal('http://iojs.org/api/path.html'); 35 | item.el.hasClass('tooltipped').should.be.false; 36 | }); 37 | 38 | it('https://github.com/lodash/lodash', function() { 39 | var item = _.findWhere(this.result, { 40 | name: 'lodash' 41 | }); 42 | 43 | item.link.should.equal('https://github.com/lodash/lodash'); 44 | 45 | item.el.attr('href').should.equal('https://github.com/lodash/lodash'); 46 | item.el.hasClass('tooltipped').should.be.false; 47 | }); 48 | }); 49 | -------------------------------------------------------------------------------- /test/fixtures/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "playground-repo", 3 | "description": "My personal playground", 4 | "version": "0.0.1", 5 | "homepage": "https://github.com/stefanbuck/playground-repo", 6 | "bugs": "https://github.com/stefanbuck/playground-repo/issues", 7 | "license": "MIT", 8 | "directories": { 9 | "main": "./main", 10 | "bin": "./bin" 11 | }, 12 | "bin": "./index.js", 13 | "main": "index.js", 14 | "author": { 15 | "name": "Stefan Buck", 16 | "email": "dev@stefanbuck.com", 17 | "url": "http://stefanbuck.com" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/stefanbuck/playground-repo" 22 | }, 23 | "keywords": [], 24 | "dependencies": { 25 | "lodash": "2.4.1", 26 | "request": "^2.40.0", 27 | "modernizr": "Modernizr/Modernizr", 28 | "backbone": "jashkenas/backbone#master", 29 | "jquery": "jquery/jquery#1.x-master", 30 | "unknown-package-name": "latest" 31 | }, 32 | "devDependencies": { 33 | "chai": "^1.9.1", 34 | "gulp": "^3.6.2" 35 | }, 36 | "optionalDependencies": { 37 | "should": "^3.3.1" 38 | }, 39 | "peerDependencies": { 40 | "yo": ">=1.0.0" 41 | }, 42 | "scripts": { 43 | "coveralls": "gulp test && cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", 44 | "test": "gulp test" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /test/test_require.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | 7 | describe('require.js', function() { 8 | 9 | this.timeout(4000); 10 | 11 | before(function(done) { 12 | helper('require.js', function(err, _result) { 13 | if (err) { 14 | return done(err); 15 | } 16 | this.result = _result.require; 17 | done(); 18 | }.bind(this)); 19 | }); 20 | 21 | it('found dependencies', function() { 22 | this.result.length.should.equal(23); 23 | }); 24 | 25 | it('check link replacement', function() { 26 | $('.octo-linker').length.should.equal(23); 27 | }); 28 | 29 | it('http://iojs.org/api/path.html', function() { 30 | var item = _.findWhere(this.result, { 31 | name: 'path' 32 | }); 33 | 34 | item.el.data('type').should.equal('npm'); 35 | item.el.data('value').should.equal('path'); 36 | }); 37 | 38 | it('https://github.com/lodash/lodash', function() { 39 | var item = _.findWhere(this.result, { 40 | name: 'lodash' 41 | }); 42 | 43 | item.el.data('type').should.equal('npm'); 44 | item.el.data('value').should.equal('lodash'); 45 | }); 46 | 47 | it('unknown-package-name', function() { 48 | var item = _.findWhere(this.result, { 49 | name: 'unknown-package-name' 50 | }); 51 | 52 | item.el.data('type').should.equal('npm'); 53 | item.el.data('value').should.equal('unknown-package-name'); 54 | }); 55 | }); 56 | -------------------------------------------------------------------------------- /test/test_live-resover.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | var sinon = require('sinon'); 7 | 8 | describe('live-resolver.js', function() { 9 | this.timeout(4000); 10 | var openStub; 11 | 12 | before(function(done) { 13 | helper('require.js', function(err, _result) { 14 | if (err) { 15 | return done(err); 16 | } 17 | this.result = _result.require; 18 | openStub = sinon.stub(); 19 | global.open = openStub; 20 | done(); 21 | }.bind(this)); 22 | }); 23 | 24 | afterEach(function() { 25 | openStub.reset(); 26 | }); 27 | 28 | it('https://nodejs.org/api/path.html', function() { 29 | global.$.ajax = function () { 30 | var d = global.$.Deferred(); 31 | d.resolve(); 32 | return d.promise(); 33 | }; 34 | var item = _.findWhere(this.result, { 35 | name: 'path' 36 | }); 37 | 38 | $(item.el).click(); 39 | openStub.args[0][0].should.equal('https://nodejs.org/api/path.html'); 40 | }); 41 | 42 | it('https://www.npmjs.org/package/lodash', function() { 43 | global.$.ajax = function () { 44 | var d = global.$.Deferred(); 45 | d.reject({}); 46 | return d.promise(); 47 | }; 48 | var item = _.findWhere(this.result, { 49 | name: 'lodash' 50 | }); 51 | 52 | item.el.click(); 53 | openStub.args[0][0].should.equal('https://www.npmjs.org/package/lodash'); 54 | }); 55 | 56 | it('https://github.com/foo/lodash', function() { 57 | global.$.ajax = function () { 58 | var d = global.$.Deferred(); 59 | d.resolve({ 60 | url: 'https://github.com/foo/lodash' 61 | }); 62 | return d.promise(); 63 | }; 64 | var item = _.findWhere(this.result, { 65 | name: 'lodash' 66 | }); 67 | 68 | item.el.click(); 69 | openStub.args[0][0].should.equal('https://github.com/foo/lodash'); 70 | }); 71 | 72 | }); 73 | -------------------------------------------------------------------------------- /test/test_manifest_bower.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | // var registries = require('octo-linker-cache'); 7 | 8 | describe('bower.json', function() { 9 | 10 | this.timeout(4000); 11 | 12 | before(function(done) { 13 | helper('bower.json', function(err, _result) { 14 | if (err) { 15 | return done(err); 16 | } 17 | this.result = _result.manifest; 18 | done(); 19 | }.bind(this)); 20 | }); 21 | 22 | it('found dependencies', function() { 23 | this.result.length.should.equal(8); 24 | }); 25 | 26 | it('check order', function() { 27 | this.result.length.should.equal(8); 28 | var pkgNames = ['lodash', 'modernizr', 'backbone', 'jquery', 'unknown-package-name', 'chai', 'should', 'lodash']; 29 | _.each(this.result, function(item, index) { 30 | item.name.should.equal( pkgNames[index] ); 31 | }); 32 | }); 33 | 34 | it('check link replacement', function() { 35 | $('.octo-linker').length.should.equal(9); 36 | }); 37 | 38 | it('link https://github.com/lodash/lodash', function() { 39 | var item = _.findWhere(this.result, { 40 | name: 'lodash' 41 | }); 42 | 43 | item.el.data('type').should.equal('bower'); 44 | item.el.data('value').should.equal('lodash'); 45 | }); 46 | 47 | it('link https://github.com/Modernizr/Modernizr', function() { 48 | var item = _.findWhere(this.result, { 49 | name: 'modernizr' 50 | }); 51 | 52 | item.el.data('type').should.equal('bower'); 53 | item.el.data('value').should.equal('modernizr'); 54 | }); 55 | 56 | it('link https://github.com/jashkenas/backbone/tree/master', function() { 57 | var item = _.findWhere(this.result, { 58 | name: 'backbone' 59 | }); 60 | 61 | item.el.data('type').should.equal('bower'); 62 | item.el.data('value').should.equal('backbone'); 63 | }); 64 | 65 | it('link https://github.com/jquery/jquery/tree/1.x-master', function() { 66 | var item = _.findWhere(this.result, { 67 | name: 'jquery' 68 | }); 69 | 70 | item.el.data('type').should.equal('bower'); 71 | item.el.data('value').should.equal('jquery'); 72 | }); 73 | 74 | it('link http://bower.io/search/?q=unknown-package-name', function() { 75 | var item = _.findWhere(this.result, { 76 | name: 'unknown-package-name' 77 | }); 78 | 79 | item.el.data('type').should.equal('bower'); 80 | item.el.data('value').should.equal('unknown-package-name'); 81 | }); 82 | 83 | it('entry file', function() { 84 | $('.octo-linker[href="index.js"]').length.should.equal(1); 85 | }); 86 | }); 87 | -------------------------------------------------------------------------------- /test/test_utils.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('../lib/util/util'); 4 | 5 | describe('util', function() { 6 | 7 | // describe('manifest.supported', function() { 8 | 9 | // it('package.json', function() { 10 | // manifest.supported('https://github.com/octo-linker/core/blob/master/package.json').should.equal(true); 11 | // }); 12 | 13 | // it('bower.json', function() { 14 | // manifest.supported('https://github.com/octo-linker/core/blob/master/bower.json').should.equal(true); 15 | // }); 16 | 17 | // it('composer.json', function() { 18 | // manifest.supported('https://github.com/octo-linker/core/blob/master/composer.json').should.equal(true); 19 | // }); 20 | 21 | // it('unknown.json', function() { 22 | // manifest.supported('https://github.com/octo-linker/core/blob/master/unknown.json').should.equal(false); 23 | // }); 24 | // }); 25 | 26 | // describe('require.supported', function() { 27 | 28 | // it('file.js', function() { 29 | // reqr.supported('https://github.com/octo-linker/core/blob/master/file.js').should.equal(true); 30 | // }); 31 | 32 | // it('file.coffee', function() { 33 | // reqr.supported('https://github.com/octo-linker/core/blob/master/file.coffee').should.equal(true); 34 | // }); 35 | 36 | // it('file.txt', function() { 37 | // reqr.supported('https://github.com/octo-linker/core/blob/master/file.txt').should.equal(false); 38 | // }); 39 | // }); 40 | 41 | // describe('advanced urls', function() { 42 | 43 | // it('with line marker', function() { 44 | // manifest.supported('https://github.com/octo-linker/core/blob/master/package.json#L1').should.equal(true); 45 | // reqr.supported('https://github.com/octo-linker/core/blob/master/file.js#L1').should.equal(true); 46 | // }); 47 | // }); 48 | 49 | describe('stripQuotes', function() { 50 | it('lodash', function() { 51 | utils.stripQuotes({text: function(){return 'lodash';}}).should.equal('lodash'); 52 | }); 53 | 54 | it('"lodash"', function() { 55 | utils.stripQuotes({text: function(){return '"lodash"';}}).should.equal('lodash'); 56 | }); 57 | 58 | it('\'lodash\'', function() { 59 | utils.stripQuotes({text: function(){return '\'lodash\'';}}).should.equal('lodash'); 60 | }); 61 | 62 | it('"lodash\'', function() { 63 | utils.stripQuotes({text: function(){return '"lodash\'';}}).should.equal('lodash'); 64 | }); 65 | 66 | it(' lodash ', function() { 67 | utils.stripQuotes({text: function(){return ' lodash ';}}).should.equal('lodash'); 68 | }); 69 | }); 70 | 71 | // TODO implement test for 72 | describe('urlMatch', function() {}); 73 | describe('showLoader', function() {}); 74 | }); 75 | -------------------------------------------------------------------------------- /test/test_manifest_composer.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | 7 | describe('composer.json', function() { 8 | 9 | this.timeout(4000); 10 | 11 | before(function(done) { 12 | helper('composer.json', function(err, _result) { 13 | if (err) { 14 | return done(err); 15 | } 16 | this.result = _result.manifest; 17 | done(); 18 | }.bind(this)); 19 | }); 20 | 21 | it('found dependencies', function() { 22 | this.result.length.should.equal(7); 23 | }); 24 | 25 | it('check order', function() { 26 | this.result.length.should.equal(7); 27 | var pkgNames = ['php', 'laravel/framework', 'unknown-package-name', 'phpunit/phpunit', 'doctrine/dbal', 'ext-openssl', 'doctrine/dbal']; 28 | _.each(this.result, function(item, index) { 29 | item.name.should.equal( pkgNames[index] ); 30 | }); 31 | }); 32 | 33 | it('check link replacement', function() { 34 | $('.octo-linker').length.should.equal(7); 35 | }); 36 | 37 | describe('require', function() { 38 | 39 | it('link php', function() { 40 | var item = _.findWhere(this.result, { 41 | name: 'php' 42 | }); 43 | 44 | item.el.data('type').should.equal('composer'); 45 | item.el.data('value').should.equal('php'); 46 | }); 47 | 48 | it('link laravel/framework', function() { 49 | var item = _.findWhere(this.result, { 50 | name: 'laravel/framework' 51 | }); 52 | 53 | item.el.data('type').should.equal('composer'); 54 | item.el.data('value').should.equal('laravel/framework'); 55 | }); 56 | 57 | it('link unknown-package-name', function() { 58 | var item = _.findWhere(this.result, { 59 | name: 'unknown-package-name' 60 | }); 61 | 62 | item.el.data('type').should.equal('composer'); 63 | item.el.data('value').should.equal('unknown-package-name'); 64 | }); 65 | }); 66 | 67 | describe('require-dev', function() { 68 | 69 | it('link phpunit/phpunit', function() { 70 | var item = _.findWhere(this.result, { 71 | name: 'phpunit/phpunit' 72 | }); 73 | 74 | item.el.data('type').should.equal('composer'); 75 | item.el.data('value').should.equal('phpunit/phpunit'); 76 | }); 77 | 78 | it('link doctrine/dbal', function() { 79 | var item = _.findWhere(this.result, { 80 | name: 'doctrine/dbal' 81 | }); 82 | 83 | item.el.data('type').should.equal('composer'); 84 | item.el.data('value').should.equal('doctrine/dbal'); 85 | }); 86 | }); 87 | 88 | describe('suggest', function() { 89 | 90 | it('link ext-openssl', function() { 91 | var item = _.findWhere(this.result, { 92 | name: 'ext-openssl' 93 | }); 94 | 95 | item.el.data('type').should.equal('composer'); 96 | item.el.data('value').should.equal('ext-openssl'); 97 | }); 98 | 99 | it('doctrine/dbal', function() { 100 | var item = this.result[this.result.length - 1]; 101 | 102 | item.el.data('type').should.equal('composer'); 103 | item.el.data('value').should.equal('doctrine/dbal'); 104 | }); 105 | }); 106 | }); 107 | -------------------------------------------------------------------------------- /test/test_manifest_package.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var assert = require('should'); 4 | var _ = require('lodash'); 5 | var helper = require('./helper'); 6 | 7 | describe('package.json', function() { 8 | 9 | this.timeout(4000); 10 | 11 | before(function(done) { 12 | helper('package.json', function(err, _result) { 13 | if (err) { 14 | return done(err); 15 | } 16 | this.result = _result.manifest; 17 | done(); 18 | }.bind(this)); 19 | }); 20 | 21 | it('found dependencies', function() { 22 | this.result.length.should.equal(10); 23 | }); 24 | 25 | it('check order', function() { 26 | this.result.length.should.equal(10); 27 | var pkgNames = ['lodash', 'request', 'modernizr', 'backbone', 'jquery', 'unknown-package-name', 'chai', 'gulp', 'yo', 'should']; 28 | _.each(this.result, function(item, index) { 29 | item.name.should.equal( pkgNames[index] ); 30 | }); 31 | }); 32 | 33 | it('check link replacement', function() { 34 | $('.octo-linker').length.should.equal(14); 35 | }); 36 | 37 | it('link https://github.com/lodash/lodash', function() { 38 | var item = _.findWhere(this.result, { 39 | name: 'lodash' 40 | }); 41 | 42 | item.el.data('type').should.equal('npm'); 43 | item.el.data('value').should.equal('lodash'); 44 | }); 45 | 46 | it('link https://www.npmjs.org/package/request', function() { 47 | var item = _.findWhere(this.result, { 48 | name: 'request' 49 | }); 50 | 51 | item.el.data('type').should.equal('npm'); 52 | item.el.data('value').should.equal('request'); 53 | }); 54 | 55 | it('link https://github.com/Modernizr/Modernizr', function() { 56 | var item = _.findWhere(this.result, { 57 | name: 'modernizr' 58 | }); 59 | 60 | item.el.data('type').should.equal('npm'); 61 | item.el.data('value').should.equal('modernizr'); 62 | }); 63 | 64 | it('link https://github.com/jashkenas/backbone/tree/master', function() { 65 | var item = _.findWhere(this.result, { 66 | name: 'backbone' 67 | }); 68 | 69 | item.el.data('type').should.equal('npm'); 70 | item.el.data('value').should.equal('backbone'); 71 | }); 72 | 73 | it('link https://github.com/jquery/jquery/tree/1.x-master', function() { 74 | var item = _.findWhere(this.result, { 75 | name: 'jquery' 76 | }); 77 | 78 | item.el.data('type').should.equal('npm'); 79 | item.el.data('value').should.equal('jquery'); 80 | }); 81 | 82 | it('link https://www.npmjs.org/package/unknown-package-name', function() { 83 | var item = _.findWhere(this.result, { 84 | name: 'unknown-package-name' 85 | }); 86 | 87 | item.el.data('type').should.equal('npm'); 88 | item.el.data('value').should.equal('unknown-package-name'); 89 | }); 90 | 91 | it('link directories', function() { 92 | $('.octo-linker[href="./main"]').length.should.equal(1); 93 | $('.octo-linker[href="./bin"]').length.should.equal(1); 94 | }); 95 | 96 | it('entry file', function() { 97 | $('.octo-linker[href="index.js"]').length.should.equal(1); 98 | }); 99 | 100 | it('bin file', function() { 101 | $('.octo-linker[href="./index.js"]').length.should.equal(1); 102 | }); 103 | }); 104 | -------------------------------------------------------------------------------- /test/fixtures/gist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | gist:a61cb95f9b28270d86a9 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 41 |
42 | 43 | 44 | 71 | 72 |
73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 |
81 |
82 |
    83 | 84 |
85 |

86 |
87 |
88 | 89 | 90 | petereberlecom 91 | / 92 | gist:a61cb95f9b28270d86a9 93 |
94 |
95 | Created 96 |
97 |

98 | 99 |
100 | 101 |
102 |
103 | 104 | 105 |
106 |
110 | 111 |
112 |
113 |
114 | 130 |
131 |
132 | 133 |
134 | 135 |
136 |

Embed URL

137 |
138 | 139 | 140 | 141 | 142 |
143 |
144 |

145 | 146 | 147 |
148 |

HTTPS clone URL

149 |
150 | 151 | 152 | 153 | 154 |
155 |
156 | 157 | 158 |
159 |

SSH clone URL

160 |
161 | 162 | 163 | 164 | 165 |
166 |
167 | 168 | 169 |

You can clone with 170 | HTTPS 171 | or SSH. 172 |

173 | 174 | 175 | 176 | 177 | Download Gist 178 |
179 | 180 |
181 | 182 | 183 |
184 | 185 |
186 |
187 | 188 | View gist:a61cb95f9b28270d86a9 189 | 190 |
191 |
192 | 193 | 194 | 195 | 196 |
197 |
198 |
199 | Raw 202 |
203 |
204 |
205 | 208 |
209 | 210 | 211 | 212 | 213 |
214 | 215 | 216 | 219 | 223 | 224 |
217 | 1 218 | 220 |
require('octo-linker-core'); 221 |
222 |
225 |
226 | 227 |
228 |
229 | 230 | 231 |
232 | 233 |
234 | 235 |
236 | 237 |
238 |
239 | Sign up for free 240 | to join this conversation on GitHub. 241 | Already have an account? 242 | Sign in to comment 243 |
244 | 245 | 246 |
247 |
248 |
249 |
250 |
251 |
252 | 253 |
254 |
255 | 256 |
257 |
258 |
259 | 260 |
261 |
262 | 263 | Something went wrong with that request. Please try again. 264 | 265 |
266 |
267 | 268 | 269 | 295 | 296 |
297 |
298 |
299 | 300 |
301 |
303 |
304 |
305 |
306 |
307 | 316 |
317 | 318 | 319 | 320 | 321 | -------------------------------------------------------------------------------- /test/fixtures/require_markdown.md.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | core/require_markdown.md at master · octo-linker/core · GitHub 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | Skip to content 65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 116 | 117 | 118 | 119 |
120 |
121 |
122 | 123 |
124 |
125 |
126 | 127 | 168 | 169 |

170 | 171 | /core 174 | 175 | 176 | 177 | 178 | 179 |

180 |
181 |
182 | 183 |
184 |
185 |
186 | 187 | 232 | 233 |
234 | 235 |
238 |

HTTPS clone URL

239 |
240 | 242 | 243 | 244 | 245 |
246 |
247 | 248 | 249 |
252 |

Subversion checkout URL

253 |
254 | 256 | 257 | 258 | 259 |
260 |
261 | 262 | 263 | 264 |

You can clone with 265 | HTTPS or Subversion. 266 | 267 | 268 | 269 |

270 | 271 | 272 | 273 | 278 | 279 | Download ZIP 280 | 281 |
282 |
283 | 284 |
285 | 286 | 287 | 288 | 289 | 290 | 291 |
292 | 293 |
294 | 299 | 300 | branch: 301 | master 302 | 303 | 304 | 441 |
442 | 443 |
444 | 449 | 450 | 451 | 452 |
453 | 454 | 457 |
458 | 459 | 460 |
461 |
462 | @stefanbuck 463 | stefanbuck 464 | 465 |
466 | fix require md test 467 |
468 |
469 | 470 |
471 |

472 | 473 | 1 474 | contributor 475 | 476 |

477 | 478 |
479 | 488 |
489 | 490 |
491 |
492 |
493 | 494 |
495 | Raw 496 | Blame 497 | History 498 |
499 | 500 | 501 | 504 | 505 | 508 |
509 | 510 |
511 | 5 lines (3 sloc) 512 | 513 | 0.03 kb 514 |
515 |
516 |
517 |
require('lodash');
518 |
519 |
520 | 521 |
522 | 523 | Jump to Line 524 | 530 | 531 |
532 | 533 |
534 | 535 |
536 |
537 | 538 | 539 |
540 | 541 |
542 | 564 |
565 | 566 | 567 |
568 |
569 |
570 | 571 |
572 |
573 |
574 |
575 |
576 | 585 |
586 | 587 | 588 | 589 | 590 | 591 | 592 |
593 | 594 | 595 | Something went wrong with that request. Please try again. 596 |
597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | -------------------------------------------------------------------------------- /test/fixtures/require.coffee.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | core/require.coffee at master · octo-linker/core · GitHub 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | Skip to content 65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 116 | 117 | 118 | 119 |
120 |
121 |
122 | 123 |
124 |
125 |
126 | 127 | 168 | 169 |

170 | 171 | /core 174 | 175 | 176 | 177 | 178 | 179 |

180 |
181 |
182 | 183 |
184 |
185 |
186 | 187 | 232 | 233 |
234 | 235 |
238 |

HTTPS clone URL

239 |
240 | 242 | 243 | 244 | 245 |
246 |
247 | 248 | 249 |
252 |

Subversion checkout URL

253 |
254 | 256 | 257 | 258 | 259 |
260 |
261 | 262 | 263 | 264 |

You can clone with 265 | HTTPS or Subversion. 266 | 267 | 268 | 269 |

270 | 271 | 272 | 273 | 278 | 279 | Download ZIP 280 | 281 |
282 |
283 | 284 |
285 | 286 | 287 | 288 | 289 | 290 | 291 |
292 | 293 |
294 | 299 | 300 | branch: 301 | master 302 | 303 | 304 | 441 |
442 | 443 |
444 | 449 | 450 | 451 | 452 |
453 | 454 | 457 |
458 | 459 | 460 |
461 |
462 | @stefanbuck 463 | stefanbuck 464 | 465 |
466 | fix coffee test 467 |
468 |
469 | 470 |
471 |

472 | 473 | 1 474 | contributor 475 | 476 |

477 | 478 |
479 | 488 |
489 | 490 |
491 |
492 |
493 | 494 |
495 | Raw 496 | Blame 497 | History 498 |
499 | 500 | 501 | 504 | 505 | 508 |
509 | 510 |
511 | 3 lines (2 sloc) 512 | 513 | 0.042 kb 514 |
515 |
516 | 517 |
518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 |
require "path"
lodash = require("lodash")
528 | 529 |
530 | 531 |
532 | 533 | Jump to Line 534 | 540 | 541 |
542 | 543 |
544 | 545 |
546 |
547 | 548 | 549 |
550 | 551 |
552 | 574 |
575 | 576 | 577 |
578 |
579 |
580 | 581 |
582 |
583 |
584 |
585 |
586 | 595 |
596 | 597 | 598 | 599 | 600 | 601 | 602 |
603 | 604 | 605 | Something went wrong with that request. Please try again. 606 |
607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | -------------------------------------------------------------------------------- /test/fixtures/require.es6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | core/require.es6 at master · octo-linker/core · GitHub 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | Skip to content 74 |
75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 128 | 129 | 130 | 131 |
132 |
133 |
134 | 135 |
136 |
137 |
138 | 139 | 140 | 181 | 182 |

183 | 184 | /core 187 | 188 | 189 | 190 | 191 | 192 |

193 |
194 |
195 | 196 |
197 |
198 |
199 | 200 | 244 | 245 |
246 | 247 |
249 |

HTTPS clone URL

250 |
251 | 253 | 254 | 255 | 256 |
257 |
258 | 259 | 260 |
262 |

Subversion checkout URL

263 |
264 | 266 | 267 | 268 | 269 |
270 |
271 | 272 | 273 | 274 |
You can clone with 275 |
or
. 276 | 277 | 278 | 279 |
280 | 281 | 282 | 283 | Clone in Desktop 284 | 285 | 286 | 287 | 288 | 293 | 294 | Download ZIP 295 | 296 |
297 |
298 | 299 |
300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 |
308 | 309 |
310 | 314 | 315 | branch: 316 | master 317 | 318 | 319 | 465 |
466 | 467 |
468 | 473 | 474 | 475 | 476 |
477 | 478 | 481 |
482 | 483 | 484 |
485 |
486 | @eligolding 487 | eligolding 488 | 489 |
490 | Tests for es6 491 |
492 |
493 | 494 |
495 |

496 | 497 | 1 498 | contributor 499 | 500 |

501 | 502 |
503 | 512 |
513 | 514 |
515 |
516 |
517 | 518 |
519 | Raw 520 | Blame 521 | History 522 |
523 | 524 | 528 | 529 | 530 | 531 | 534 | 535 | 538 |
539 | 540 |
541 | 5 lines (4 sloc) 542 | 543 | 0.116 kB 544 |
545 |
546 | 547 | 548 |
549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 |
import "path";
import lodash from "lodash";
import * as dash from "lodash";
import exp, {pick, omit} from "lodash";
export*from "url"
571 | 572 |
573 | 574 |
575 | 576 | Jump to Line 577 | 582 | 583 |
584 | 585 |
586 | 587 |
588 |
589 | 590 | 591 |
592 | 593 |
594 | 617 |
618 | 619 | 620 |
621 |
622 |
623 | 624 |
625 |
626 |
627 |
628 |
629 | 638 |
639 | 640 | 641 | 642 | 643 | 644 | 645 |
646 | 647 | 648 | Something went wrong with that request. Please try again. 649 |
650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | -------------------------------------------------------------------------------- /test/fixtures/require.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | core/require.js at master · octo-linker/core · GitHub 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | Skip to content 65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 116 | 117 | 118 | 119 |
120 |
121 |
122 | 123 |
124 |
125 |
126 | 127 | 168 | 169 |

170 | 171 | /core 174 | 175 | 176 | 177 | 178 | 179 |

180 |
181 |
182 | 183 |
184 |
185 |
186 | 187 | 232 | 233 |
234 | 235 |
238 |

HTTPS clone URL

239 |
240 | 242 | 243 | 244 | 245 |
246 |
247 | 248 | 249 |
252 |

Subversion checkout URL

253 |
254 | 256 | 257 | 258 | 259 |
260 |
261 | 262 | 263 | 264 |

You can clone with 265 | HTTPS or Subversion. 266 | 267 | 268 | 269 |

270 | 271 | 272 | 273 | 278 | 279 | Download ZIP 280 | 281 |
282 |
283 | 284 |
285 | 286 | 287 | 288 | 289 | 290 | 291 |
292 | 293 |
294 | 299 | 300 | branch: 301 | master 302 | 303 | 304 | 441 |
442 | 443 |
444 | 449 | 450 | 451 | 452 |
453 | 454 | 457 |
458 | 459 | 460 |
461 |
462 | @stefanbuck 463 | stefanbuck 464 | 465 | 468 |
469 | 470 |
471 |

472 | 473 | 1 474 | contributor 475 | 476 |

477 | 478 |
479 | 488 |
489 | 490 |
491 |
492 |
493 | 494 |
495 | Raw 496 | Blame 497 | History 498 |
499 | 500 | 501 | 504 | 505 | 508 |
509 | 510 |
511 | 25 lines (23 sloc) 512 | 513 | 0.561 kb 514 |
515 |
516 | 517 |
518 | 519 | 520 | 521 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 |
522 |
require('path');
require('lodash');
require('unknown-package-name');
require('./file.js');
require('./folder/file.js');
require('./file-or-folder');
require('../file.js');
require('../folder/file.js');
require('../file-or-folder');
require('../../file.js');
require('../../folder/file.js');
require('../../file-or-folder');
require('./');
require('..');
require('../');
require('../..');
require('../../');
require('.');
require('...');
require('/');
require('matthewmueller/uid');
require('component/tip@master');
require('yields/shortcuts@0.0.1:/index.js');
617 | 618 |
619 | 620 |
621 | 622 | Jump to Line 623 | 629 | 630 |
631 | 632 |
633 | 634 |
635 |
636 | 637 | 638 |
639 | 640 |
641 | 663 |
664 | 665 | 666 |
667 |
668 |
669 | 670 |
671 |
672 |
673 |
674 |
675 | 684 |
685 | 686 | 687 | 688 | 689 | 690 | 691 |
692 | 693 | 694 | Something went wrong with that request. Please try again. 695 |
696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | -------------------------------------------------------------------------------- /test/fixtures/bower.json.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | core/bower.json at master · octo-linker/core · GitHub 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | Skip to content 65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 116 | 117 | 118 | 119 |
120 |
121 |
122 | 123 |
124 |
125 |
126 | 127 | 168 | 169 |

170 | 171 | /core 174 | 175 | 176 | 177 | 178 | 179 |

180 |
181 |
182 | 183 |
184 |
185 |
186 | 187 | 232 | 233 |
234 | 235 |
238 |

HTTPS clone URL

239 |
240 | 242 | 243 | 244 | 245 |
246 |
247 | 248 | 249 |
252 |

Subversion checkout URL

253 |
254 | 256 | 257 | 258 | 259 |
260 |
261 | 262 | 263 | 264 |

You can clone with 265 | HTTPS or Subversion. 266 | 267 | 268 | 269 |

270 | 271 | 272 | 273 | 278 | 279 | Download ZIP 280 | 281 |
282 |
283 | 284 |
285 | 286 | 287 | 288 | 289 | 290 | 291 |
292 | 293 |
294 | 299 | 300 | branch: 301 | master 302 | 303 | 304 | 441 |
442 | 443 |
444 | 449 | 450 | 451 | 452 |
453 | 454 | 457 |
458 | 459 | 460 |
461 |
462 | @stefanbuck 463 | stefanbuck 464 | 465 |
466 | add bower fixture 467 |
468 |
469 | 470 |
471 |

472 | 473 | 1 474 | contributor 475 | 476 |

477 | 478 |
479 | 488 |
489 | 490 |
491 |
492 |
493 | 494 |
495 | Raw 496 | Blame 497 | History 498 |
499 | 500 | 501 | 504 | 505 | 508 |
509 | 510 |
511 | 32 lines (31 sloc) 512 | 513 | 0.828 kb 514 |
515 |
516 | 517 |
518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 |
{
"name": "playground-repo",
"description": "My personal playground",
"version": "0.0.1",
"main": "index.js",
"license": "MIT",
"ignore": "",
"keywords": [],
"author": [
"Stefan Buck <dev@stefanbuck.com> (http://stefanbuck.com)"
],
"homepage": "https://github.com/stefanbuck/playground-repo",
"repository": {
"type": "git",
"url": "https://github.com/stefanbuck/playground-repo"
},
"dependencies": {
"lodash": "2.4.1",
"modernizr": "Modernizr/Modernizr",
"backbone": "jashkenas/backbone#master",
"jquery": "jquery/jquery#1.x-master",
"unknown-package-name": "latest"
},
"devDependencies": {
"chai": "^1.9.1",
"should": "^3.3.1"
},
"resolutions": {
"lodash": "2.1.0"
}
}
644 | 645 |
646 | 647 |
648 | 649 | Jump to Line 650 | 656 | 657 |
658 | 659 |
660 | 661 |
662 |
663 | 664 | 665 |
666 | 667 |
668 | 690 |
691 | 692 | 693 |
694 |
695 |
696 | 697 |
698 |
699 |
700 |
701 |
702 | 711 |
712 | 713 | 714 | 715 | 716 | 717 | 718 |
719 | 720 | 721 | Something went wrong with that request. Please try again. 722 |
723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | --------------------------------------------------------------------------------