Skip to content

Commit

Permalink
More file fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
tchalvak committed Dec 25, 2023
1 parent 327f88e commit 12b6c99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions components/CBot/CBot.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import ReactDOM from 'react-dom'
import { createRoot } from 'react-dom/client'
import { default as CBot } from './CBot'

describe('<CBot />', () => {
it('renders a command input field', () => {
const div = document.createElement('div')
const root = ReactDOM.createRoot(div).render(<CBot placeholder="type a command" />)
root.unmount(div)
const root = createRoot(div)
root.render(<CBot placeholder="type a command" />)
root.unmount()
})
})
4 changes: 3 additions & 1 deletion components/models/operateInitialize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

export const operateInitialize = (model) => {
const operateInitialize = (model) => {
// loop over the fields and set them as properties on the model instance
return Object.keys(model.fields).forEach((fieldName) => {
Object.defineProperty(model.prototype, fieldName, {
Expand All @@ -12,3 +12,5 @@ export const operateInitialize = (model) => {
});
});
};

export default operateInitialize;

0 comments on commit 12b6c99

Please sign in to comment.