Registry / testing / firescript-syntax-test

firescript-syntax-test

JSON →
library0.3.3jsnpmunverified

A test suite for validating Firescript syntax parsing. Firescript is a compile-to-JavaScript language with a Pythonic indentation-based syntax. This package provides a framework to define and run syntax tests against Firescript code. Version 0.3.3 is the latest stable release, with limited cadence. It is primarily used internally for the Firescript compiler. Differentiators: purpose-built for Firescript syntax, not general-purpose testing. Limited community adoption.

npm install firescript-syntax-test
INSTALL
IMPORT
SIG · FIRESCRIPT-SYNTAX-
F
firescript-syntax-test
testingjavascriptv0.3.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import FirescriptSyntaxTest from 'firescript-syntax-test'
const FirescriptSyntaxTest = require('firescript-syntax-test')
Package is ESM-only; no CommonJS support.
SyntaxTest
import { SyntaxTest } from 'firescript-syntax-test'
Named export for the main test class.
parseSyntax
import { parseSyntax } from 'firescript-syntax-test'
Utility function for parsing Firescript syntax string.

Demonstrates loading a Firescript code string and running syntax tests.

import FirescriptSyntaxTest from 'firescript-syntax-test'; import { SyntaxTest } from 'firescript-syntax-test'; const test = new SyntaxTest(); test.load('example.fs', 'let x = 5\nif x > 0\n print(x)'); const result = test.run(); console.log(result);
Debug
Known issues
breakingrequire() is not supported; ESM-only.
fix
Use ESM imports (import) instead of require().
affects: >=0.3.0
gotchaPackage under development; API may change in minor versions.
fix
Pin exact version in dependencies.
affects: <1.0.0
deprecatedThe old class `TestSyntax` renamed to `SyntaxTest`.
fix
Use `SyntaxTest` instead.
affects: <0.3.0
gotchaOnly accepts Firescript code; no JavaScript or other languages.
fix
Ensure input is valid Firescript syntax.
affects: *
gotchaIndentation-sensitive; mixing tabs and spaces may cause errors.
fix
Use consistent indentation (spaces recommended).
affects: *
Errors
Common errors & fixes
SyntaxError: Unexpected token 'let'
Using ES6 syntax in a file with .fs extension but Firescript parser expects Pythonic syntax.
fix
Write Firescript syntax: 'let x = 5' not 'let x = 5' (if that is the issue). Actually write Firescript: 'x = 5'.
TypeError: SyntaxTest is not a constructor
Imported default incorrectly; may have used named import on default export.
fix
Use `import { SyntaxTest } from 'firescript-syntax-test'` or default import.
Error: Module not found: Can't resolve 'firescript-syntax-test'
Package not installed or ESM resolution issue.
fix
Run `npm install firescript-syntax-test` and ensure project uses ESM (type: module in package.json).
Upgrade
Version history
0.3.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
firescript-syntax-test — npm install firescript-syntax-test · libregistry