File: index.js

package info (click to toggle)
node-webpack 4.43.0-6~bpo10%2B1
  • links: PTS, VCS
  • area: main
  • in suites: buster-backports
  • size: 21,220 kB
  • sloc: javascript: 69,992; makefile: 22
file content (18 lines) | stat: -rw-r--r-- 627 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var fs = require("fs");
var path = require("path");

it("should complete", function(done) {
	require.ensure(["./a"], function(require) {
		expect(require("./a")).toBe("a");
		done();
	});
});

it("should write the correct manifest", function() {
	var manifest = JSON.parse(fs.readFileSync(path.join(__dirname, 'bundle0-manifest.json'), "utf-8"));
	expect(manifest).toHaveProperty("content");
	expect(manifest).toHaveProperty("name");
	expect(manifest.content).not.toHaveProperty(["./a.js"]);
	expect(manifest.content).toHaveProperty(["./index.js"]);
	expect(manifest.content["./index.js"]).toHaveProperty("id", module.id);
});