Tag: javascript

Setting up GraphQL's findBreakingChanges and eslint-plugin-graphql

When most folks talk about GraphQL features, a few things tend to surface commonly. Things like GraphiQL, declarative data, and consolidated network calls are distinguishing factors that I'm sure you've heard of. Today, I'd like to talk about implementing a few other features that will

Continue Reading

Require JavaScript files the sane way: with symlinks

On an application of medium to large size, requiring JavaScript files with relative paths can become a chore. I think you can agree that seeing: require('../../../some/dir/file_i_want.js') makes you feel somewhat uncomfortable. Though this may work in early-stage projects,

Continue Reading

Chaining Sinon Mocks

Update Sinon actually already has a nice API for doing this out of the box without any prototype mucking: /** * test.mpsec.js */ var sinon = require('sinon'); var expect = require('chai').expect; var rewire = require('rewire'); var main = rewire('main'); var CoolModuleMock = { start: sinon.stub().returnsThis(

Continue Reading