summaryrefslogtreecommitdiff
path: root/app/models/character
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/character')
-rw-r--r--app/models/character/character.test.ts6
-rw-r--r--app/models/character/character.ts7
2 files changed, 7 insertions, 6 deletions
diff --git a/app/models/character/character.test.ts b/app/models/character/character.test.ts
index 2f330b4..d7bfac7 100644
--- a/app/models/character/character.test.ts
+++ b/app/models/character/character.test.ts
@@ -1,9 +1,9 @@
-import { CharacterModel } from "./character"
+import { CharacterModel } from './character'
-test("can be created", () => {
+test('can be created', () => {
const instance = CharacterModel.create({
id: 1,
- name: "Rick Sanchez",
+ name: 'Rick Sanchez',
})
expect(instance).toBeTruthy()
diff --git a/app/models/character/character.ts b/app/models/character/character.ts
index ca3cbc7..a9a2e46 100644
--- a/app/models/character/character.ts
+++ b/app/models/character/character.ts
@@ -1,9 +1,9 @@
-import { Instance, SnapshotOut, types } from "mobx-state-tree"
+import { Instance, SnapshotOut, types } from 'mobx-state-tree'
/**
* Rick and Morty character model.
*/
-export const CharacterModel = types.model("Character").props({
+export const CharacterModel = types.model('Character').props({
id: types.identifierNumber,
name: types.maybe(types.string),
status: types.maybe(types.string),
@@ -14,4 +14,5 @@ type CharacterType = Instance<typeof CharacterModel>
export interface Character extends CharacterType {}
type CharacterSnapshotType = SnapshotOut<typeof CharacterModel>
export interface CharacterSnapshot extends CharacterSnapshotType {}
-export const createCharacterDefaultModel = () => types.optional(CharacterModel, {})
+export const createCharacterDefaultModel = () =>
+ types.optional(CharacterModel, {})