to() {
              return "newFile.txt";
            }
/*",
          },
        ],
      })
        .then(({ stats }) => {
          const { contextDependencies } = stats.compilation;
          const isIncludeDependency = contextDependencies.has(
            path.join(FIXTURES_DIR, "directory"),
          );

          expect(isIncludeDependency).toBe(true);
        })
        .then(done)
        .catch(done);
    });

    it("should not add the directory to the watch list when glob is a file", (done) => {
      const expectedAssetKeys = ["directoryfile.txt"];

      run({
        patterns: [
          {
            from: "directory/directoryfile.txt",
          },
        ],
      })
        .then(({ compiler, stats }) => {
          expect(Array.from(Object.keys(readAssets(compiler, stats)))).toEqual(
            expectedAssetKeys,
          );
        })
        .then(done)
        .catch(done);
    });

    it("should include files that have changed when `from` is a file", (done) => {
      runChange({
        expectedAssetKeys: ["tempfile1.txt", "tempfile2.txt"],
        newFileLoc1: path.join(FIXTURES_DIR, "watch", "_t5", "tempfile1.txt"),
        newFileLoc2: path.join(FIXTURES_DIR, "watch", "_t5", "tempfile2.txt"),
        patterns: [
          {
            from: "tempfile1.txt",
            context: "watch/_t5",
          },
          {
            from: "tempfile2.txt",
            context: "watch/_t5",
          },
        ],
      })
        .then(done)
        .catch(done);
    });

    it("should include all files when `from` is a directory", (done) => {
      runChange({
        expectedAssetKeys: [".gitkeep", "tempfile1.txt", "tempfile2.txt"],
        newFileLoc1: path.join(
          FIXTURES_DIR,
          "watch",
          "_t4",
          "directory",
          "tempfile1.txt",
        ),
        newFileLoc2: path.join(
          FIXTURES_DIR,
          "watch",
          "_t4",
          "directory",
          "tempfile2.txt",
        ),
        patterns: [
          {
            from: "watch/_t4/directory",
          },
        ],
      })
        .then(done)
        .catch(done);
    });

    it("should include all files when `from` is a glob", (done) => {
      runChange({
        expectedAssetKeys: [
          "_t3/dest1/tempfile1.txt",
          "_t3/dest1/tempfile2.txt",
        ],
        newFileLoc1: path.join(
          FIXTURES_DIR,
          "watch",
          "_t3",
          "directory",
          "tempfile1.txt",
        ),
        newFileLoc2: path.join(
          FIXTURES_DIR,
          "watch",
          "_t3",
          "directory",
          "tempfile2.txt",
        ),
        patterns: [
          {
            context: "watch/_t3/directory",
            from: "*