mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-03 12:04:24 +02:00
Add pre-commit config and auto-format files
This commit is contained in:
parent
6ce0e6d01c
commit
e8650c5bc2
22 changed files with 383 additions and 363 deletions
|
@ -1,5 +1,5 @@
|
|||
const { defineConfig } = require("cypress");
|
||||
const getCompareSnapshotsPlugin = require('cypress-image-diff-js/dist/plugin');
|
||||
const getCompareSnapshotsPlugin = require("cypress-image-diff-js/dist/plugin");
|
||||
|
||||
module.exports = defineConfig({
|
||||
e2e: {
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
Cypress.on('window:before:load', win => {
|
||||
cy.spy(win.console, 'error')
|
||||
cy.spy(win.console, 'warn')
|
||||
cy.spy(win.console, 'log')
|
||||
})
|
||||
Cypress.on("window:before:load", (win) => {
|
||||
cy.spy(win.console, "error");
|
||||
cy.spy(win.console, "warn");
|
||||
cy.spy(win.console, "log");
|
||||
});
|
||||
|
||||
describe('GodotXterm HTML5 export', () => {
|
||||
it('Loads and runs without error', () => {
|
||||
cy.visit('http://localhost:3000')
|
||||
cy.compareSnapshot('menu', 0.9, {
|
||||
limit: 100, delay: 200, timeout: 20000,
|
||||
})
|
||||
cy.get('body').type('{downArrow}{enter}')
|
||||
cy.get('body').type('window.console.log("It works!"){enter}')
|
||||
cy.window().then(win => {
|
||||
cy.expect(win.console.error).to.have.callCount(0)
|
||||
cy.expect(win.console.warn).to.have.callCount(0)
|
||||
cy.expect(win.console.log).to.be.calledWith("It works!")
|
||||
})
|
||||
})
|
||||
})
|
||||
describe("GodotXterm HTML5 export", () => {
|
||||
it("Loads and runs without error", () => {
|
||||
cy.visit("http://localhost:3000");
|
||||
cy.compareSnapshot("menu", 0.9, {
|
||||
limit: 100,
|
||||
delay: 200,
|
||||
timeout: 20000,
|
||||
});
|
||||
cy.get("body").type("{downArrow}{enter}");
|
||||
cy.get("body").type('window.console.log("It works!"){enter}');
|
||||
cy.window().then((win) => {
|
||||
cy.expect(win.console.error).to.have.callCount(0);
|
||||
cy.expect(win.console.warn).to.have.callCount(0);
|
||||
cy.expect(win.console.log).to.be.calledWith("It works!");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import compareSnapshotCommand from 'cypress-image-diff-js/dist/command';
|
||||
import compareSnapshotCommand from "cypress-image-diff-js/dist/command";
|
||||
compareSnapshotCommand();
|
||||
|
|
|
@ -1 +1 @@
|
|||
import './commands'
|
||||
import "./commands";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue