{"id":25587,"library":"firescript-syntax-test","title":"Firescript Syntax Test","description":"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.","status":"active","version":"0.3.3","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","Firescript","test","fire","firetest","syntax","syntaxtest"],"install":[{"cmd":"npm install firescript-syntax-test","lang":"bash","label":"npm"},{"cmd":"yarn add firescript-syntax-test","lang":"bash","label":"yarn"},{"cmd":"pnpm add firescript-syntax-test","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only; no CommonJS support.","wrong":"const FirescriptSyntaxTest = require('firescript-syntax-test')","symbol":"default","correct":"import FirescriptSyntaxTest from 'firescript-syntax-test'"},{"note":"Named export for the main test class.","wrong":"","symbol":"SyntaxTest","correct":"import { SyntaxTest } from 'firescript-syntax-test'"},{"note":"Utility function for parsing Firescript syntax string.","wrong":"","symbol":"parseSyntax","correct":"import { parseSyntax } from 'firescript-syntax-test'"}],"quickstart":{"code":"import FirescriptSyntaxTest from 'firescript-syntax-test';\nimport { SyntaxTest } from 'firescript-syntax-test';\n\nconst test = new SyntaxTest();\ntest.load('example.fs', 'let x = 5\\nif x > 0\\n    print(x)');\nconst result = test.run();\nconsole.log(result);","lang":"javascript","description":"Demonstrates loading a Firescript code string and running syntax tests."},"warnings":[{"fix":"Use ESM imports (import) instead of require().","message":"require() is not supported; ESM-only.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Pin exact version in dependencies.","message":"Package under development; API may change in minor versions.","severity":"gotcha","affected_versions":"<1.0.0"},{"fix":"Use `SyntaxTest` instead.","message":"The old class `TestSyntax` renamed to `SyntaxTest`.","severity":"deprecated","affected_versions":"<0.3.0"},{"fix":"Ensure input is valid Firescript syntax.","message":"Only accepts Firescript code; no JavaScript or other languages.","severity":"gotcha","affected_versions":"*"},{"fix":"Use consistent indentation (spaces recommended).","message":"Indentation-sensitive; mixing tabs and spaces may cause errors.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Write Firescript syntax: 'let x = 5' not 'let x = 5' (if that is the issue). Actually write Firescript: 'x = 5'.","cause":"Using ES6 syntax in a file with .fs extension but Firescript parser expects Pythonic syntax.","error":"SyntaxError: Unexpected token 'let'"},{"fix":"Use `import { SyntaxTest } from 'firescript-syntax-test'` or default import.","cause":"Imported default incorrectly; may have used named import on default export.","error":"TypeError: SyntaxTest is not a constructor"},{"fix":"Run `npm install firescript-syntax-test` and ensure project uses ESM (type: module in package.json).","cause":"Package not installed or ESM resolution issue.","error":"Error: Module not found: Can't resolve 'firescript-syntax-test'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}