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 tests #474

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pnpm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
47 changes: 47 additions & 0 deletions app/utils/stripIndent.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { describe, it, expect } from 'vitest';
import { stripIndents } from './stripIndent';

describe('stripIndents', () => {
it('should strip indents from a regular string', () => {
const input = `
Hello
World
!
`;
const expected = 'Hello\nWorld\n!';
expect(stripIndents(input)).toBe(expected);
});

it('should handle template literals with expressions', () => {
const name = 'World';
const result = stripIndents`
Hello
${name}
!
`;
expect(result).toBe('Hello\nWorld\n!');
});

it('should handle empty lines', () => {
const input = `
First line

Last line
`;
expect(stripIndents(input)).toBe('First line\n\nLast line');
});

it('should handle strings with no indentation', () => {
const input = 'Hello\nWorld\n!';
expect(stripIndents(input)).toBe('Hello\nWorld\n!');
});

it('should handle mixed indentation', () => {
const input = `
First
Second
Third
`;
expect(stripIndents(input)).toBe('First\nSecond\nThird');
});
});
2 changes: 1 addition & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Join the community for oTToDev!

https://thinktank.ottomator.ai

## Whats Bolt.new
## Whats oTToDev

Bolt.new is an AI-powered web development agent that allows you to prompt, run, edit, and deploy full-stack applications directly from your browser—no local setup required. If you're here to build your own AI-powered web dev agent using the Bolt open source codebase, [click here to get started!](./CONTRIBUTING.md)

Expand Down
Loading