one
Version:
One is a new React Framework that makes Vite serve both native and web.
24 lines (23 loc) • 842 B
JavaScript
import { describe, expect, it } from "vitest";
import { getTypedRoutesDeclarationFile } from "./getTypedRoutesDeclarationFile.native.js";
function createRouteContext(paths) {
var context = function () {
return {
default() {}
};
};
Object.defineProperty(context, "keys", {
value: function () {
return paths;
}
});
return context;
}
describe(getTypedRoutesDeclarationFile, function () {
it("does not emit trailing whitespace for multi-line route unions", function () {
var declaration = getTypedRoutesDeclarationFile(createRouteContext(["./index+ssg.tsx", "./about+ssg.tsx", "./[slug]+ssg.tsx"]));
expect(declaration).toContain(" StaticRoutes:\n | `/`");
expect(declaration).not.toMatch(/[ \t]+$/m);
});
});
//# sourceMappingURL=getTypedRoutesDeclarationFile.test.native.js.map