This package has moved to the tldraw/tldraw monorepo.
tldraw / core Goto Github PK
View Code? Open in Web Editor NEWRenderer for tldraw and maybe you, too.
Home Page: https://tldraw-core-example.vercel.app/
Renderer for tldraw and maybe you, too.
Home Page: https://tldraw-core-example.vercel.app/
This package has moved to the tldraw/tldraw monorepo.
Need some of your thoughts on how you want to approach writing tests.
describe('binding', () => {
test('mounts component without crashing', () => {
render(<Binding point={[0, 0]} type={'anchor'} />)
})
test('validate attributes rendered properly for anchor binding type', () => {
const { container } = render(<Binding point={[10, 20]} type={'anchor'} />)
const use = container.querySelector('use')
expect(use?.getAttribute('href')).toBe('#cross')
expect(use?.getAttribute('x')).toBe('10')
expect(use?.getAttribute('y')).toBe('20')
})
}
container & dom query selection is not regarded as best practice in RTL. Only benefit to this approach, there is no need to change Binding component src code.
You can suggest which query selector you prefer. Based on that we may need to update actual component.
Created few simple test locally, not able to push to core remote branch. Initially planning to write small tests & small commit to get your review comments, so that I can align to your coding styles & approaches.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.