Skip to content

Commit

Permalink
test: ✅ update event assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerbenw committed Apr 24, 2024
1 parent 25b48b7 commit be604e7
Show file tree
Hide file tree
Showing 24 changed files with 39 additions and 92 deletions.
46 changes: 0 additions & 46 deletions test/electron/fixtures/app/src/preloads/default.js

This file was deleted.

7 changes: 0 additions & 7 deletions test/electron/fixtures/app/webpack.renderer.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
const { readdirSync } = require('fs')
const { parse } = require('path')
const entrypoints = {}
readdirSync('./src/preloads').forEach(name => {
entrypoints[parse(name).name] = `./src/preloads/${name}`
})

module.exports = {
resolve: {
fallback: {
Expand Down
4 changes: 2 additions & 2 deletions test/electron/fixtures/events/app-launch/complex-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
"errorClass": "ReferenceError",
"stacktrace": [
{
"file": "./src/errors.js",
"lineNumber": 6,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
Expand Down
4 changes: 2 additions & 2 deletions test/electron/fixtures/events/app-launch/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"errorClass": "ReferenceError",
"stacktrace": [
{
"file": "./src/errors.js",
"lineNumber": 6,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
Expand Down
4 changes: 2 additions & 2 deletions test/electron/fixtures/events/app-launch/launch-complete.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"errorClass": "ReferenceError",
"stacktrace": [
{
"file": "./src/errors.js",
"lineNumber": 6,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"errorClass": "ReferenceError",
"stacktrace": [
{
"file": "./src/errors.js",
"lineNumber": 6,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
"errorMessage": "something bad",
"errorClass": "ReferenceError",
"stacktrace": [{
"file": "./src/errors.js",
"lineNumber": 18,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
Expand Down
12 changes: 6 additions & 6 deletions test/electron/fixtures/events/main/handled-error/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@
"errorMessage": "something bad",
"errorClass": "ReferenceError",
"stacktrace": [{
"file": "./src/errors.js",
"lineNumber": 18,
"code": {
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
}],
"type": "electronnodejs"
}
}],
"type": "electronnodejs"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
"errorClass": "ReferenceError",
"errorMessage": "foo is not defined",
"stacktrace": [{
"file": "./src/errors.js",
"lineNumber": 6,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
"errorClass": "ReferenceError",
"errorMessage": "foo is not defined",
"stacktrace": [{
"file": "./src/errors.js",
"lineNumber": 6,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@
"errorClass": "ReferenceError",
"errorMessage": "foo is not defined",
"stacktrace": [{
"file": "./src/errors.js",
"lineNumber": 6,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": "{TYPE:undefined}"
}],
"type": "electronnodejs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
"errorClass": "TypeError",
"errorMessage": "invalid",
"stacktrace": [{
"file": "./src/errors.js",
"lineNumber": 10,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
"errorClass": "TypeError",
"errorMessage": "invalid",
"stacktrace": [{
"file": "./src/errors.js",
"lineNumber": 10,
"file": ".webpack/main/index.js",
"lineNumber": 2,
"code": {
"1": "{TYPE:string}"
}
Expand Down
4 changes: 2 additions & 2 deletions test/electron/fixtures/events/on-error/complex-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
"errorClass": "Error",
"stacktrace": [
{
"lineNumber": 44,
"file": "./renderer.js"
"lineNumber": 1,
"file": ".webpack/renderer/main_window/index.js"
}
],
"type": "electronrendererjs"
Expand Down
4 changes: 2 additions & 2 deletions test/electron/fixtures/events/on-error/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
"errorClass": "Error",
"stacktrace": [
{
"lineNumber": 44,
"file": "./renderer.js"
"lineNumber": 1,
"file": ".webpack/renderer/main_window/index.js"
}
],
"type": "electronrendererjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"stacktrace": [
{
"lineNumber": 1,
"file": "./renderer.js"
"file": ".webpack/renderer/main_window/index.js"
}
],
"type": "electronrendererjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"stacktrace": [
{
"lineNumber": 1,
"file": "./renderer.js"
"file": ".webpack/renderer/main_window/index.js"
}
],
"type": "electronrendererjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"stacktrace": [
{
"lineNumber": 1,
"file": "./renderer.js"
"file": ".webpack/renderer/main_window/index.js"
}
],
"type": "electronrendererjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"stacktrace": [
{
"lineNumber": 1,
"file": "./renderer.js"
"file": ".webpack/renderer/main_window/index.js"
}
],
"type": "electronrendererjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"stacktrace": [
{
"lineNumber": 1,
"file": "./renderer.js"
"file": ".webpack/renderer/main_window/index.js"
}
],
"type": "electronrendererjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"stacktrace": [
{
"file": ".webpack/renderer/main_window/index.js",
"lineNumber": 27,
"lineNumber": 1,
"code": {
"1": "{TYPE:string}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"stacktrace": [
{
"file": ".webpack/renderer/main_window/index.js",
"lineNumber": 27,
"lineNumber": 1,
"code": {
"1": "{TYPE:string}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"stacktrace": [
{
"file": ".webpack/renderer/main_window/index.js",
"lineNumber": 23,
"lineNumber": 1,
"code": {
"1": "{TYPE:string}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"stacktrace": [
{
"file": ".webpack/renderer/main_window/index.js",
"lineNumber": 23,
"lineNumber": 1,
"code": {
"1": "{TYPE:string}"
}
Expand Down

0 comments on commit be604e7

Please sign in to comment.