Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add web support #539

Merged
merged 4 commits into from
Oct 8, 2021
Merged

Conversation

aeschli
Copy link
Contributor

@aeschli aeschli commented Sep 13, 2021

Adds a new server main that can run in a webworker.

See redhat-developer/vscode-yaml#594 for the details

import { YAMLServerInit } from '../yamlServerInit';
import { SettingsState } from '../yamlSettings';

declare const self: any;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix this warning?

});

afterEach(() => {
sandbox.restore();
});
it('Should care Win URI', async () => {
const connection = <Connection>{};
const resultPromise = schemaRequestHandler(connection, 'c:\\some\\window\\path\\scheme.json', [], URI.parse(''), false);
const resultPromise = schemaRequestHandler(connection, 'c:\\some\\window\\path\\scheme.json', [], URI.parse(''), false, testFileSystem);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this prettier error?

const result = await resultPromise;
expect(result).to.be.equal('{some: "json"}');
});

it('should handle not valid Windows path', async () => {
const connection = <Connection>{};
const resultPromise = schemaRequestHandler(connection, 'A:/some/window/path/scheme.json', [], URI.parse(''), false);
const resultPromise = schemaRequestHandler(connection, 'A:/some/window/path/scheme.json', [], URI.parse(''), false, testFileSystem);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this

@@ -46,6 +47,8 @@ export function setupSchemaIDTextDocument(content: string, customSchemaID?: stri
}
}

export const testFileSystem = { readFile: (fsPath: string) => fs.readFile(fsPath).then(c => c.toString())};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this

@coveralls
Copy link

coveralls commented Oct 8, 2021

Coverage Status

Coverage decreased (-0.02%) to 74.291% when pulling ddddcf4 on aeschli:aeschli/webextension into 1df0c4f on redhat-developer:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants