Socket
Book a DemoInstallSign in
Socket

vscode-tmlanguage-snapshot

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-tmlanguage-snapshot

Take snapshots of your tmLanguage grammar.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
252
-66.13%
Maintainers
1
Weekly downloads
 
Created
Source

vscode-tmlanguage-snapshot

Take snapshots of your tmLanguage grammar.

NPM version

📦 Installation

$ npm install vscode-tmlanguage-snapshot
$ yarn add vscode-tmlanguage-snapshot
$ pnpm add vscode-tmlanguage-snapshot

🚀 Usage

// tests/grammar.spec.ts
import { createGrammarSnapshot } from "vscode-tmlanguage-snapshot";

const packageJsonPath = path.resolve(__dirname, "../package.json");
const snapshot = await createGrammarSnapshot(packageJsonPath);
const fixtures = fs.readdirSync(fixturesDir);

for (const fixture of fixtures) {
	it(fixture, async () => {
		const result = await snapshot(`tests/grammarFixtures/${fixture}`);

		expect(result).toMatchSnapshot();
	});
}

You can also refer to our tests for more examples.

🤝 Credits

Ported from vscode-tmgrammar-test, refactored for better library usage.

📝 License

MIT. Made with ❤️ by Ray

Keywords

grammar

FAQs

Package last updated on 31 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts