File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed
packages/server/test/support/fixtures/projects/config-with-custom-file-js Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,23 @@ const cypressModuleApi = {
6868 return cli . parseRunCommand ( args )
6969 } ,
7070 } ,
71+
72+ /**
73+ * Provides automatic code completion for configuration in many popular code editors.
74+ * While it's not strictly necessary for Cypress to parse your configuration, we
75+ * recommend wrapping your config object with `defineConfig()`
76+ * @example
77+ * module.exports = defineConfig({
78+ * viewportWith: 400
79+ * })
80+ *
81+ * @see ../types/cypress-npm-api.d.ts
82+ * @param {Cypress.ConfigOptions } config
83+ * @returns {Cypress.ConfigOptions } the configuration passed in parameter
84+ */
85+ defineConfig ( config ) {
86+ return config
87+ } ,
7188}
7289
7390module . exports = cypressModuleApi
Original file line number Diff line number Diff line change @@ -377,6 +377,21 @@ declare module 'cypress' {
377377 * Cypress does
378378 */
379379 cli : CypressCommandLine . CypressCliParser
380+
381+ /**
382+ * Provides automatic code completion for configuration in many popular code editors.
383+ * While it's not strictly necessary for Cypress to parse your configuration, we
384+ * recommend wrapping your config object with `defineConfig()`
385+ * @example
386+ * module.exports = defineConfig({
387+ * viewportWith: 400
388+ * })
389+ *
390+ * @see ../types/cypress-npm-api.d.ts
391+ * @param {Cypress.ConfigOptions } config
392+ * @returns {Cypress.ConfigOptions } the configuration passed in parameter
393+ */
394+ defineConfig ( config : Cypress . ConfigOptions ) : Cypress . ConfigOptions
380395 }
381396
382397 // export Cypress NPM module interface
Original file line number Diff line number Diff line change 1- module . exports = {
1+ const { defineConfig } = require ( 'cypress' )
2+
3+ module . exports = defineConfig ( {
24 pageLoadTimeout : 10000 ,
35 e2e : {
46 defaultCommandTimeout : 500 ,
57 videoCompression : 20 ,
68 } ,
7- }
9+ } )
You can’t perform that action at this time.
0 commit comments