diff --git a/examples/parcel/parcel.spec.js b/examples/parcel/parcel.spec.js index 3383fee271..a92b7a6821 100644 --- a/examples/parcel/parcel.spec.js +++ b/examples/parcel/parcel.spec.js @@ -1,10 +1,11 @@ -const fs = require('fs'); +const runfiles = require(process.env['BAZEL_NODE_RUNFILES_HELPER']); describe('bundling', () => { it('should work', () => { let written; console.log = (m) => written = m; - const bundle = require('examples_parcel/bundle.js'); + const bundlePath = runfiles.resolveWorkspaceRelative('bundle.js'); + require(bundlePath); expect(written).toEqual('Hello, Bob'); }); });