Generation

testsMon, 14 Nov 2022

function(state) { return state.createEntity.cancelItems.map((i) => i.bookingItemId }

import unittest class TestFunction(unittest.TestCase): def test_function(self): state = { createEntity: { cancelItems: [ { bookingItemId: 1, }, { bookingItemId: 2, }, ], }, } self.assertEqual(function(state), [1, 2])

Want to kickstart your project?Use the new AI Studio to create your code