// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.import{ createRequire }from"./module.ts";import{ assertEquals }from"../testing/asserts.ts"; constrequire=createRequire(import.meta.url); Deno.test("get-caller-file works",()=>{const getCallerFile =require("get-caller-file");// The caller is foo. foo belongs to this file.// So the getCallerFile() returns the filename of this filefunctionfoo(){returngetCallerFile();}assertEquals(foo(),import.meta.url.replace(/^file:\/\//,""));});