Skip to content

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

chore: move diff_match_patch into the test package (#9475)

Joel Einbinder2a0a44bc09e6
diff --git a/packages/playwright-test/src/matchers/golden.ts b/packages/playwright-test/src/matchers/golden.ts
index 1605bb55fe..b7e02ad126 100644
--- a/packages/playwright-test/src/matchers/golden.ts
+++ b/packages/playwright-test/src/matchers/golden.ts
@@ -21,7 +21,7 @@ import fs from 'fs';
import path from 'path';
import jpeg from 'jpeg-js';
import pixelmatch from 'pixelmatch';
-import { diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL } from 'playwright-core/src/third_party/diff_match_patch';
+import { diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL } from '../third_party/diff_match_patch';
import { TestInfoImpl, UpdateSnapshots } from '../types';
import { addSuffixToFilePath } from '../util';
diff --git a/packages/playwright-core/src/third_party/diff_match_patch.js b/packages/playwright-test/src/third_party/diff_match_patch.js
similarity index 100%
rename from packages/playwright-core/src/third_party/diff_match_patch.js
rename to packages/playwright-test/src/third_party/diff_match_patch.js
diff --git a/utils/build/build.js b/utils/build/build.js
index 69cd458c01..7080135551 100644
--- a/utils/build/build.js
+++ b/utils/build/build.js
@@ -194,6 +194,13 @@ copyFiles.push({
ignored: ['**/.eslintrc.js', '**/webpack*.config.js', '**/injected/**/*']
});
+copyFiles.push({
+ files: 'packages/playwright-test/src/**/*.js',
+ from: 'packages/playwright-test/src',
+ to: 'packages/playwright-test/lib',
+ ignored: ['**/.eslintrc.js']
+});
+
// Sometimes we require JSON files that babel ignores.
// For example, deviceDescriptorsSource.json
copyFiles.push({