Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websmith addon testing api #43

Merged
merged 52 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bc3a73a
T Polishes BDD test setup
jwloka Apr 28, 2024
955f6d9
[WIP]** Introduces Testing API
jwloka Apr 28, 2024
52e92c0
!! Makes project compile
jwloka Apr 29, 2024
3900465
F Provides intial testing API for websmith addons
jwloka Apr 29, 2024
3902a5e
r Removes extracted API from package test
jwloka Apr 29, 2024
9b300fe
e Removes dependency to websmith-api package from package test
jwloka Apr 29, 2024
a3bfeb1
F Adds handling of project files to testing API for websmith addons
jwloka Apr 29, 2024
8f3fc00
F Adds initial documentation of the testing API
jwloka Apr 29, 2024
8e08373
F Provides working API for handling of project and addon files
jwloka May 1, 2024
e6a7df1
e Aligns package dependencies and test aliases
jwloka May 1, 2024
240068e
a Fixes automatic linting issues
jwloka May 1, 2024
708d0ec
F Provides getProjectFile function
jwloka May 1, 2024
28aae98
F Provides additional API for compiling a project and checking the re…
jwloka May 2, 2024
eddf083
B Fixes two issues with the compiler
jwloka May 2, 2024
dc7b8b0
B Fixes hoisting issue with linked workspace packages
jwloka May 2, 2024
795752c
a Fixes build and linting issues
jwloka May 2, 2024
81d8c3f
F Enable to copy addon and project files from actual FS into virtual …
jwloka May 2, 2024
ae5b898
t Removes cucumber tests from E2E testing environment
jwloka May 2, 2024
ef937c6
a Adds missing license headers
jwloka May 2, 2024
a869eb8
r Renames CompilationAddon API to prefer `getName()` instead of `name…
jwloka May 2, 2024
a45581a
r Renames setupProjectFromXXX method to addProjectFromXXX to be align…
jwloka May 2, 2024
a4416b1
e Removes testUrls from jest.configs
jwloka May 2, 2024
c583ed4
F Introduces getPaths() and getContents() mapping API for ProjectFiles
jwloka May 2, 2024
3151c90
d Updates README to document initial testing API
jwloka May 2, 2024
640ee17
F Show off how to use the testing API with the addon examples package
jwloka May 2, 2024
2c74170
t Don't add empty projects to your test data
jwloka May 2, 2024
5a11f32
E Upgrades project dependencies
jwloka May 2, 2024
85220be
e Disables linting warnings in vscode, removes extra warnings
jwloka May 2, 2024
5d49e24
e Adds examples test to test:e2e target
jwloka May 2, 2024
a81b667
r Replaces deprecated rmdirSync with rmSync
jwloka May 3, 2024
30b5b1c
r Introduces type CompilerAddons to improve usage over native array
jwloka May 3, 2024
693bbc0
t Provides additional unit tests for AddonRegistry
jwloka May 3, 2024
e02428a
r Restructure state handling in AddonRegistry to isolate expected and…
jwloka May 3, 2024
0117f30
t Inline compile system in every test
jwloka May 5, 2024
c5641c5
R!! Removes initial files property from CompilationEnv
jwloka May 5, 2024
f10ecf4
R Adds project files in tests explicitly and and refresh the AddonReg…
jwloka May 5, 2024
9d63f58
R!! Removes the AddonRegistry from the CompilerOptions
jwloka May 5, 2024
568bf70
r Don't reselect transitive exports
jwloka May 5, 2024
ba9b4dd
t Hides unrelated warning in test
jwloka May 5, 2024
474b7f2
t Removes debug log statement from test
jwloka May 5, 2024
1c97855
r Renames AddonRegistryOptions to AddonConfig
jwloka May 5, 2024
e102343
R Use string[] for addons in compiler code
jwloka May 5, 2024
8b5fdc3
r Tidy packages exports
jwloka May 6, 2024
ac4d58d
e Fixes debug config for webpack e2e tests
jwloka May 6, 2024
dcf05bc
r Tidy exports in index files
jwloka May 6, 2024
db355de
B!! Replaces remaining usages of AddonRegistry in config options
jwloka May 6, 2024
f5a319b
B Fixes in-memory compilation of addons from external source folder
jwloka May 6, 2024
e541b31
t Adds e2e tests for remaining example addons
jwloka May 6, 2024
15497db
B Fixes an issue where projects from custom source paths are copied i…
jwloka May 7, 2024
c620c9c
F Adds initial documentation for testing addon examples
jwloka May 7, 2024
240de58
B Fixes flaky removal of working directory
jwloka May 7, 2024
4d7da05
B Fixes flaky removal of working directory (again)
jwloka May 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .npmrc
jwloka marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
registry=https://registry.npmjs.org
registry=https://registry.npmjs.org
node-linker=hoisted
2 changes: 0 additions & 2 deletions packages/test/src/test-examples/bar-addon.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { compilationEnv } from "@quatico/websmith-testing";

describe("test-project-foo", () => {
Expand Down
4 changes: 0 additions & 4 deletions packages/testing/src/compilation/environment.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { resolve } from "path";
import ts from "typescript";
import { compilationEnv } from "./environment";
Expand Down
1 change: 0 additions & 1 deletion packages/testing/src/compilation/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export class CompilationEnv {
return this.getAddonRegistry().getAddonsDir();
}

// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
public getActiveAddon(addonName: string): CompilerAddon | undefined {
return this.getAddonRegistry()
.getAvailableAddons()
Expand Down
1 change: 0 additions & 1 deletion packages/testing/src/compile-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const DEFAULT_ADDONS_DIR = "../addons";

export const compileOptions = (
system: ts.System,
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
overrides?: Partial<CompilerOptions> & { tsconfig?: Partial<ts.ParsedCommandLine>; project?: Partial<ts.CompilerOptions>; targets?: string[] }
): CompilerOptions => {
const reporter = new ReporterMock(system);
Expand Down