Repository: parcel-bundler/parcel
File: packages/core/integration-tests/test/elm.js (JavaScript)

Code before:

    let output = await run(b);
    assert.equal(typeof output().Elm.Main.init, 'function');
  });
  it('should produce a elm bundle with debugger', async function() {
    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'));

    await run(b);
    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');
    assert(js.includes('elm$browser$Debugger'));
  });

  it('should apply elm-hot if HMR is enabled', async function() {
    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {
      hot: true,
    });

    await assertBundles(b, [
      {
        type: 'js',
        assets: [
          'HMRRuntime.js',
          'Main.elm',
          'index.js',
          'react-refresh-runtime.development.js',
          'ReactRefreshRuntime.js',
          'runtime.js',
        ],
      },
    ]);

    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');
    assert(js.includes('[elm-hot]'));
  });

  it('should remove debugger in production', async function() {
    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {
      mode: 'production',
    });

    await run(b);
    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');
    assert(!js.includes('elm$browser$Debugger'));
  });

  it('should remove debugger when environment variable `PARCEL_ELM_NO_DEBUG` is set to true', async function() {
    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {
      env: {PARCEL_ELM_NO_DEBUG: true},
    });

    await run(b);

Review comment (suggestion):
Can you add these two files (containing `{}` and being empty, respectively):
```
	packages/core/integration-tests/test/integration/elm/package.json
	packages/core/integration-tests/test/integration/elm/yarn.lock
```

Then the React related HMR assets aren't bundled here (as it should be).

Code after:

    let output = await run(b);
    assert.equal(typeof output().Elm.Main.init, 'function');
  });
  it('should produce a elm bundle with debugger', async function() {
    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'));

    await run(b);
    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');
    assert(js.includes('elm$browser$Debugger'));
  });

  it('should apply elm-hot if HMR is enabled', async function() {
    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {
      hot: true,
    });

    await assertBundles(b, [
      {
        type: 'js',
        assets: ['HMRRuntime.js', 'Main.elm', 'index.js'],
      },
    ]);

    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');
    assert(js.includes('[elm-hot]'));
  });

  it('should remove debugger in production', async function() {
    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {
      mode: 'production',
    });

    await run(b);
    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');
    assert(!js.includes('elm$browser$Debugger'));
  });

  it('should remove debugger when environment variable `PARCEL_ELM_NO_DEBUG` is set to true', async function() {
    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {
      env: {PARCEL_ELM_NO_DEBUG: true},
    });

    await run(b);
    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');
    assert(!js.includes('elm$browser$Debugger'));
  });

  it('should minify Elm in production mode', async function() {
    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {
      mode: 'production',