Skip to content

Commit

Permalink
Deliberately break API
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonAlling committed Jul 20, 2024
1 parent 8f2bb44 commit 23108e3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions __tests__/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as path from "path";
import * as index from "../src/lib";
import * as environment from "../src/lib/environment";
import * as errors from "../src/lib/errors";
import * as operations from "../src/lib/operations";
import * as operations from "../src/lib/operationsLol";
import * as stylesheets from "../src/lib/stylesheets";

it("exposes the intended API", () => {
Expand Down Expand Up @@ -35,7 +35,7 @@ it("exposes everything in lib in index.ts", done => {
"errors.ts",
"index.ts",
"log.ts",
"operations.ts",
"operationsLol.ts",
"preferences.ts",
"stylesheets.ts",
"userscripter.ts",
Expand Down
10 changes: 5 additions & 5 deletions __tests__/operations.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { operations } from "../src/lib";
import { operationsLol } from "../src/lib";
import {
ALWAYS,
DOMCONTENTLOADED,
Expand All @@ -8,7 +8,7 @@ import {
Operation,
OperationAndFailure,
operation,
} from "../src/lib/operations";
} from "../src/lib/operationsLol";

const mockConsole = {
log: (message: string) => void message,
Expand Down Expand Up @@ -108,7 +108,7 @@ const OPERATIONS_BLABLABLA = [

it("can run operations", () => {
document.documentElement.innerHTML = HTML_EXAMPLE;
operations.run({
operationsLol.run({
...PLAN,
operations: OPERATIONS,
});
Expand All @@ -117,7 +117,7 @@ it("can run operations", () => {

it("can log " + BLABLABLA, () => {
document.documentElement.innerHTML = HTML_WITH_BLABLABLA;
operations.run({
operationsLol.run({
...PLAN,
operations: OPERATIONS_BLABLABLA,
});
Expand All @@ -127,7 +127,7 @@ it("can log " + BLABLABLA, () => {

it("can handle an internal failure", () => {
document.documentElement.innerHTML = HTML_WITHOUT_BLABLABLA;
operations.run({
operationsLol.run({
...PLAN,
operations: OPERATIONS_BLABLABLA,
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib/errors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { unlines } from "lines-unlines";

import { OperationAndFailure, Reason } from "./operations";
import { OperationAndFailure, Reason } from "./operationsLol";

export type OperationContext = Readonly<{
siteName: string
Expand Down
4 changes: 2 additions & 2 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as environment from "./environment";
import * as errors from "./errors";
import * as log from "./log";
import * as operations from "./operations";
import * as operationsLol from "./operationsLol";
import * as preferences from "./preferences";
import * as stylesheets from "./stylesheets";
import * as userscripter from "./userscripter";
Expand All @@ -10,7 +10,7 @@ export {
environment,
errors,
log,
operations,
operationsLol,
preferences,
stylesheets,
userscripter,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/userscripter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as log from "./log";
import * as operations from "./operations";
import * as operations from "./operationsLol";
import * as stylesheets from "./stylesheets";

export function run(userscript: {
Expand Down

0 comments on commit 23108e3

Please sign in to comment.