Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(type-generator): make the generated by message consistent on windows (#4888)

Joel Einbinder4a8915829315
diff --git a/utils/generate_types/index.js b/utils/generate_types/index.js
index d99a219b08..3ac4f881a5 100644
--- a/utils/generate_types/index.js
+++ b/utils/generate_types/index.js
@@ -91,7 +91,7 @@ let hadChanges = false;
return classBody(docClassForName(className));
});
const classes = documentation.classesArray.filter(cls => !handledClasses.has(cls.name));
- let output = `// This file is generated by ${__filename.substring(path.join(__dirname, '..', '..').length)}
+ let output = `// This file is generated by ${__filename.substring(path.join(__dirname, '..', '..').length).split(path.sep).join(path.posix.sep)}
${overrides}
${classes.map(classDesc => classToString(classDesc)).join('\n')}