Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Fix tests and broken links #129

Merged
merged 2 commits into from
Apr 22, 2021
Merged
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <a href="http://lucia.js.org"><img src="https://raw.githubusercontent.com/aidenybai/lucia/master/.github/img/logo.svg" height="60" alt="Lucia Logo" aria-label="http://lucia.js.org" /></a>
# <a href="https://lucia.js.org"><img src="https://raw.githubusercontent.com/aidenybai/lucia/master/.github/img/logo.svg" height="60" alt="Lucia Logo" aria-label="https://lucia.js.org" /></a>

### 3kb library for tiny web apps.

Expand Down Expand Up @@ -50,19 +50,19 @@ Below is an extremely simple implementation of a todo app using Lucia, utilizing

Looking for the docs? Check the [Lucia website](https://lucia.js.org) out.

Have a question about Lucia? Join the [Lucia Discord server](https://discord.gg/q2pSU39) and ask the community for help.
Have a question about Lucia? Post it on the [GitHub Discussions](https://github.com/aidenybai/lucia/discussions) and ask the community for help.

Find a bug? Head over to our [issue tracker](https://github.com/aidenybai/lucia/issues) and we'll do our best to help. We love pull requests, too!

We expect all Lucia contributors to abide by the terms of our [Code of Conduct](https://github.com/aidenybai/lucia/blob/master/.github/CODE_OF_CONDUCT.md).
We expect all Lucia contributors to abide by the terms of our [Code of Conduct](https://github.com/aidenybai/lucia/blob/master/docs/guidelines/CODE_OF_CONDUCT.md).

[**→ Start contributing on Github**](https://github.com/aidenybai/lucia/blob/master/.github/CONTRIBUTING.md)
[**→ Start contributing on GitHub**](https://github.com/aidenybai/lucia/blob/master/docs/guidelines/CONTRIBUTING.md)

## Acknowledgments

Lucia is [MIT-licensed](LICENSE.md) open-source software by [Aiden Bai](https://github.com/aidenybai) [et al.](https://github.com/aidenybai/lucia/graphs/contributors)

Lucia takes heavy inspiration from [Vue's syntax](https://github.com/vuejs/vue), and believes in the core philosophies and values behind [Alpine](https://github.com/alpinejs/alpine), [Sidewind](https://github.com/survivejs/sidewind), and [Remake](https://github.com/remake/remake-cli). Feel free to check them out if you interested in a production-ready library to use.
Lucia takes heavy inspiration from [Vue's syntax](https://github.com/vuejs/vue), and believes in the core philosophies and values behind [Alpine](https://github.com/alpinejs/alpine), [Dababy](https://github.com/aidenybai/dababy), and [Remake](https://github.com/remake/remake-cli). Feel free to check them out if you interested in an alternative library to use.

---

Expand Down
3 changes: 2 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
yarn cleanup
yarn lint
yarn test
yarn build
np
np
19 changes: 0 additions & 19 deletions src/__test__/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,4 @@ describe('.index', () => {
})
);
});

it('should throw error on init', () => {
// @ts-expect-error: originalConsole doesn't exist on window, but good enough for test
window.originalConsole = console;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
window.console = { warn: jest.fn() } as any;

const root = document.createElement('div');
const el = document.createElement('div');

el.setAttribute('l-state', '{ shouldThrowAnError }');
root.appendChild(el);
init(root);

expect(console.warn).toBeCalled();

// @ts-expect-error: cannot override console on window, but good enough for test
window.console = window.originalConsole;
});
});
4 changes: 2 additions & 2 deletions src/core/directives/__test__/html.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ describe('.htmlDirective', () => {

it('should set the html to the value', () => {
const el = document.createElement('div');
const expression = '<p>foo</p>';
const state = {};
const expression = 'foo';
const state = { foo: '<p>foo</p>' };
const data = {
value: expression,
compute: compute(expression, el),
Expand Down