# test.govlab/docs/core/lexers/shell.lexer.test.ts

> 13 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-govlab-docs-core-lexers-shell-lexer-test-ts
Source text: https://banes-lab.com/source/testing/test.govlab/docs/core/lexers/shell.lexer.test.ts.txt

Listed in [test.govlab/docs/core/lexers](https://banes-lab.com/api/source/testing/test.govlab/docs/core/lexers.md), after [test.govlab/docs/core/lexers/code.go.lexer.test.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/lexers/code.go.lexer.test.ts.md).

## Contained in

- [test.govlab/docs/core/lexers](https://banes-lab.com/anatomy/testing/folder-testing-test-govlab-docs-core-lexers.md)

## Source

```typescript
import { describe, expect, it } from "vitest";
import { tokenizeCommand } from "@govlab/docs/core/lexers/shell.lexer.ts";

describe("tokenizeCommand", () => {
    it("splits on whitespace and keeps a quoted run as one word", () => {
        expect(tokenizeCommand("concurrently \"npm run a\" 'npm run b'\tvite")).toStrictEqual([
            "concurrently",
            "npm run a",
            "npm run b",
            "vite",
        ]);
        expect(tokenizeCommand("   ")).toStrictEqual([]);
    });
});
```
