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

chore(core): run scenarios in ava context #996

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

boneskull
Copy link
Contributor

@boneskull boneskull commented Feb 5, 2024

This changes the runScenarios test so that there's a 1:1 mapping between each scenario and an Ava test.

This requires changing the file to be .mjs, however.

Also: ESLint is mightily confused, and after hammering on it for a little bit, I still couldn't figure out what magic incantations I needed to get it to parse the file.

Take it or leave it! (by that I mean: I totally understand if nobody wants to merge this. I'm not sure I do!)

@boneskull boneskull requested review from legobeat and a team as code owners February 5, 2024 22:04
@github-actions github-actions bot added dependencies Pull requests that update a dependency file pkg:lavamoat-core Changes in package lavamoat-core labels Feb 5, 2024
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch from b162047 to fe0b74e Compare February 5, 2024 22:06
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch from fe0b74e to 97888b0 Compare March 12, 2024 00:08
@boneskull
Copy link
Contributor Author

boneskull commented Mar 12, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @boneskull and the rest of your teammates on Graphite Graphite

@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch 4 times, most recently from 10564d1 to 4a630df Compare March 19, 2024 19:40
@boneskull boneskull changed the base branch from main to boneskull/zap-aa-macos-perf-test March 19, 2024 19:40
@boneskull boneskull force-pushed the boneskull/zap-aa-macos-perf-test branch from 166c953 to 8fcab2f Compare March 19, 2024 20:29
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch from 4a630df to 220df6a Compare March 19, 2024 20:29
Base automatically changed from boneskull/zap-aa-macos-perf-test to main March 20, 2024 10:51
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch 4 times, most recently from 57c36e5 to 9408aa2 Compare March 27, 2024 19:49
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch from 9408aa2 to c924dc3 Compare April 9, 2024 20:49
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch 2 times, most recently from 58360bf to 1202208 Compare May 2, 2024 19:28
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch from 1202208 to ac6807f Compare May 20, 2024 23:51
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch 2 times, most recently from ee6922e to 904dfc6 Compare May 21, 2024 21:21
import { loadScenarios } from './scenarios/index.js'
import Util from './util.js'

// TODO: figure out why TS does not like the named exports from util.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likely because it's cjs

@@ -0,0 +1,26 @@
// @ts-check

import test from 'ava'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the switch to esm necessary?

If only for top-level await, then we can wrap it in an async function and stay within cjs

@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch from 904dfc6 to c56a754 Compare June 7, 2024 19:54
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch 2 times, most recently from 528ffcf to 23e0b01 Compare June 17, 2024 20:13
This changes the `runScenarios` test so that there's a 1:1 mapping between each scenario and an Ava test.

This requires changing the file to be `.mjs`, however.

Also: ESLint is mightily confused, and after hammering on it for a little bit, I still couldn't figure out what magic incantations I needed to get it to parse the file.

Take it or leave it!
@boneskull boneskull force-pushed the boneskull/core-scenario-test-update branch from 23e0b01 to e0354cc Compare June 17, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file pkg:lavamoat-core Changes in package lavamoat-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants