mirror of
https://github.com/facebook/lexical.git
synced 2025-08-06 16:39:33 +08:00
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
*/
|
|
// @ts-check
|
|
'use strict';
|
|
|
|
const fs = require('fs-extra');
|
|
const glob = require('glob');
|
|
const {packagesManager} = require('../../shared/packagesManager');
|
|
const path = require('node:path');
|
|
const {describeExample} = require('./utils');
|
|
|
|
describe('prepare-release tests', () => {
|
|
for (const pkg of packagesManager.getPublicPackages()) {
|
|
describe(pkg.getNpmName(), () => {
|
|
const tgzPath = path.join(
|
|
'npm',
|
|
`${pkg.getDirectoryName()}-${pkg.packageJson.version}.tgz`,
|
|
);
|
|
test(`${tgzPath} exists`, () =>
|
|
expect(fs.existsSync(tgzPath)).toBe(true));
|
|
});
|
|
}
|
|
});
|
|
['examples', 'scripts/__tests__/integration/fixtures']
|
|
.flatMap((packagesDir) =>
|
|
glob.sync(`${packagesDir}/*/package.json`, {windowsPathsNoEscape: true}),
|
|
)
|
|
.forEach((exampleJsonPath) => describeExample(exampleJsonPath));
|