Skip to content

Commit

Permalink
feat: cypress test proofData
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtiti committed May 9, 2024
1 parent 6561ac8 commit cecc37b
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 1,559 deletions.
19 changes: 2 additions & 17 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
import { defineConfig } from 'cypress';
import startDevServer from '@cypress/webpack-dev-server';
import webpackConfig from './cypress/webpack.config';

export default defineConfig({
defaultCommandTimeout: 10000,
e2e: {
setupNodeEvents(on, config) {
on('dev-server:start', (options) =>
startDevServer({
options,
webpackConfig,
}),
);
return config;
},
baseUrl: 'http://localhost:3000',
},
component: {
devServer: {
framework: 'next',
bundler: 'webpack',
},
setupNodeEvents() {},
},
});
6 changes: 3 additions & 3 deletions cypress/e2e/proofData.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { formatProofData, to32Bytes } from '~/utils';
import { ISuccessResult } from '~/types';
import { formatProofData, to32Bytes } from '../../src/utils';
import { ISuccessResult } from '../../src/types';

describe('Proof Data Formatting', () => {
it('should correctly format proof data including handling of truncated merkle_root', () => {
Expand All @@ -16,6 +16,6 @@ describe('Proof Data Formatting', () => {
const output = formatProofData(input);

// Verify the output format
expect(output).to.be.an('string');
expect(output).to.be.a('string');
});
});
9 changes: 0 additions & 9 deletions cypress/plugins/index.ts

This file was deleted.

22 changes: 0 additions & 22 deletions cypress/webpack.config.ts

This file was deleted.

6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
"wagmi": "2.5.7"
},
"devDependencies": {
"@cypress/webpack-dev-server": "^3.8.0",
"@cypress/webpack-preprocessor": "^6.0.1",
"@defi-wonderland/crypto-husky-checks": "1.3.0",
"@testing-library/jest-dom": "6.1.2",
"@testing-library/react": "14.2.1",
Expand All @@ -77,8 +75,6 @@
"lodash.merge": "4.6.2",
"prettier": "3.0.3",
"styled-components": "6.0.7",
"ts-loader": "^9.5.1",
"typescript": "5.4.2",
"webpack": "^5.91.0"
"typescript": "5.4.2"
}
}
Loading

0 comments on commit cecc37b

Please sign in to comment.