Skip to content

Commit

Permalink
Add test to verify does not overwrite existing implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Jan 16, 2018
1 parent c775af7 commit c2dbe1d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/reflect-other.ts
@@ -0,0 +1,15 @@
import * as fs from "fs";
import { assert } from "chai";

describe("Reflect", () => {
it("does not overwrite existing implementation", () => {
const defineMetadata = Reflect.defineMetadata;

const reflectPath = require.resolve("../Reflect.js");
const reflectContent = fs.readFileSync(reflectPath, "utf8");
const reflectFunction = Function(reflectContent);
reflectFunction();

assert.strictEqual(Reflect.defineMetadata, defineMetadata);
});
});

0 comments on commit c2dbe1d

Please sign in to comment.