Support plugins that contain a scope in their name (#1427)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/1427 Reviewed By: mweststrate Differential Revision: D22868784 fbshipit-source-id: c332e5b05e3fccb74cf5fdcdecf15b8f2e8c5006
This commit is contained in:
committed by
Facebook GitHub Bot
parent
14e6b1078d
commit
7e84c8e880
@@ -48,6 +48,15 @@ test('valid package json', async () => {
|
||||
expect(result).toBe(null);
|
||||
});
|
||||
|
||||
test('valid scoped package json', async () => {
|
||||
const testPackageJson = Object.assign({}, validPackageJson);
|
||||
testPackageJson.name = '@test/flipper-plugin-package';
|
||||
const json = JSON.stringify(testPackageJson);
|
||||
fs.readFile = jest.fn().mockResolvedValue(new Buffer(json));
|
||||
const result = await runLint('dir');
|
||||
expect(result).toBe(null);
|
||||
});
|
||||
|
||||
test('$schema field is required', async () => {
|
||||
const testPackageJson = Object.assign({}, validPackageJson);
|
||||
delete testPackageJson.$schema;
|
||||
|
||||
Reference in New Issue
Block a user