This gist is for my talk Faster JavaScript.
So far...
A talk by @inconshreveable at The Strange Loop 2016 called "Idealized Commit Logs: Code Simplification via Program Slicing" about the amazing tools that can be built with program slicing inspired me to work on this project. Learn more about program slicing here.
This is actual output from slice-js (not yet open source), a program slicing tool that I'm working on right now. I can't wait to work out more kinks, make it more practically useful and show it to you all!
The match-sorter.js
file is the transpiled CommonJS version of match-sorter
and you can find that here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***/ }), | |
/***/ "2UZ2": | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
/* unused harmony export DropdownModuleNgFactory */ | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RenderType_Dropdown; }); | |
/* harmony export (immutable) */ __webpack_exports__["b"] = View_Dropdown_0; | |
/* unused harmony export View_Dropdown_Host_0 */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Run Starting) | |
- Browser: Chrome 61 | |
- Browser: Electron 53 (headless) | |
- Grouping: true (groupId) | |
- Parallelizing: true (parallelId) | |
- Run URL: https://dashboard.cypress.io/foo/bar/baz | |
- Specs Glob: **/*.js -- if used | |
- Specs Found: 28 (app_spec.coffee, foo_spec.js, bar_spec.js, ...26 more) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.on('message', (obj = {}) => { | |
const { id, ms } = obj | |
setTimeout(() => { | |
try { | |
// process.send could throw if | |
// parent process has already exited | |
process.send({ | |
id, | |
ms, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Creating client', () => { | |
before(() => { | |
cy.login(); | |
cy.visit('http://xyz/clients') | |
cy.get('#user-app-navigation li.active') | |
.get('a'); | |
cy.get('#user-app-navigation li.active a').should('have.attr', 'href') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cypress.addParentCommand('getCheckbox', function (labelText) { | |
return cy.chain().get('label').contains(labelText).find('input[type="checkbox"]') | |
}) | |
Cypress.addParentCommand("requestUrl", function(url) { | |
// url = baseUrl + url; | |
return cy.chain().request(url); | |
}); | |
it('works', function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<h2>iframe</h2> | |
<script type="text/javascript"> | |
setTimeout(function(){ | |
window._e2e_sessionURL = "http://some/url" | |
}, 1000) | |
</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http = require("http") | |
morgan = require("morgan") | |
express = require("express") | |
bodyParser = require("body-parser") | |
app = express() | |
srv = http.Server(app) | |
app.use(morgan("dev")) |
NewerOlder