-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f51134
commit 3233279
Showing
3 changed files
with
85 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,45 @@ | ||
{ | ||
"name": "@urban-ui/flex", | ||
"version": "0.4.0", | ||
"type": "module", | ||
"module": "./dist/index.js", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
} | ||
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"lint": "biome lint src", | ||
"type:check": "tsc", | ||
"clean": "del dist", | ||
"dev": "arc watch", | ||
"build": "arc build" | ||
}, | ||
"dependencies": { | ||
"@radix-ui/react-slot": "^1.0.2", | ||
"@stylexjs/stylex": "^0.5.1", | ||
"@urban-ui/theme": "^0.4.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@stylexjs/babel-plugin": "^0.5.1", | ||
"@stylexjs/nextjs-plugin": "^0.5.1", | ||
"@types/node": "^20.12.2", | ||
"@types/react": "^18.2.0", | ||
"@types/react-dom": "^18.2.0", | ||
"config-ts": "workspace:*", | ||
"del-cli": "^5.1.0", | ||
"react": "^18.2.0", | ||
"typescript": "^5.4.3" | ||
} | ||
"name": "@urban-ui/flex", | ||
"version": "0.4.0", | ||
"type": "module", | ||
"module": "./dist/index.js", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
} | ||
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"lint": "biome lint src", | ||
"type:check": "tsc", | ||
"clean": "del dist", | ||
"dev": "arc watch", | ||
"build": "arc build", | ||
"test": "bun test" | ||
}, | ||
"dependencies": { | ||
"@radix-ui/react-slot": "^1.0.2", | ||
"@stylexjs/stylex": "^0.5.1", | ||
"@urban-ui/theme": "^0.4.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@happy-dom/global-registrator": "^14.7.1", | ||
"@stylexjs/babel-plugin": "^0.5.1", | ||
"@stylexjs/dev-runtime": "^0.5.1", | ||
"@stylexjs/nextjs-plugin": "^0.5.1", | ||
"@types/node": "^20.12.2", | ||
"@types/react": "^18.2.0", | ||
"@types/react-dom": "^18.2.0", | ||
"config-ts": "workspace:*", | ||
"del-cli": "^5.1.0", | ||
"react": "^18.2.0", | ||
"typescript": "^5.4.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { afterEach, beforeEach, describe, expect, test } from "bun:test"; | ||
import { render, screen } from "@testing-library/react"; | ||
|
||
import { GlobalRegistrator } from "@happy-dom/global-registrator"; | ||
import inject from "@stylexjs/dev-runtime"; | ||
|
||
GlobalRegistrator.register(); | ||
|
||
// console.log(inject); | ||
// inject({ | ||
// classNamePrefix: "x", | ||
// dev: false, | ||
// test: true, | ||
// useRemForFontSize: false, | ||
// styleResolution: "application-order", | ||
// }); | ||
|
||
import { Flex } from "./index.ts"; | ||
|
||
// beforeEach(() => { | ||
// inject({ | ||
// classNamePrefix: "x", | ||
// dev: false, | ||
// test: true, | ||
// useRemForFontSize: false, | ||
// styleResolution: "application-order", | ||
// }); | ||
// }); | ||
|
||
describe("flex", () => { | ||
test("Forwards the test-id", () => { | ||
// const output = render(<Flex data-testid="some-id" />); | ||
// console.log(Flex); | ||
|
||
document.body.innerHTML = "<button>My button</button>"; | ||
const button = document.querySelector("button"); | ||
expect(button?.innerText).toEqual("My button"); | ||
|
||
const foo = 5; | ||
expect(foo).toBe(5); | ||
}); | ||
}); |