Underlying object for changeset is missing...
See original GitHub issue(…but it’s not)
Version
ember-cli: 3.17.0 ember-changeset: 3.3.1 ember-cli-typescript: 3.1.3
Test Case
given: a component that expects a changeset as a property
import { module, test } from 'qunit'
import { setupRenderingTest } from 'ember-qunit'
import { render } from '@ember/test-helpers'
import { hbs } from 'ember-cli-htmlbars'
import Changeset from 'ember-changeset'
module('Integration | Component | my-component', function(hooks) {
setupRenderingTest(hooks)
test('it renders', async function(assert) {
const obj = { bob: 'tom' }
assert.ok(Boolean(obj), 'This should be true') // <- this, the same assert from the library, passes
// @ts-ignore
this.set('changeset', new Changeset(obj)) // <- this bombs with the above error
// ...remainder of test ellided...
})
})
(this is in a closed-source project; I can’t provide a link to the repo, but I can provide more information if you’d like)
Steps to reproduce
npx ember test
Expected Behavior
The test should continue, and render the component using the changeset.
Actual Behavior
The test fails on the indicated line above, with the error Error: Assertion Failed. Underlying object for changeset is missing.
It may be significant (or not) that the result is the same whether the file ends with .js or .ts; this doesn’t appear (to me) to be an Ember TypeScript edge case.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:18
Top Results From Across the Web
Ecto.Changeset — Ecto v3.9.4 - HexDocs
Applies the changeset changes to the changeset data. This operation will return the underlying data with changes regardless if the changeset is valid...
Read more >Changelog Formats | Liquibase Docs
The changeset tag is a unit of change that Liquibase executes on a database and which is used to group database Liquibase Change...
Read more >validated-changeset - npm
On rollback, all changes are dropped and the underlying Object is left untouched. Full API. Changeset(model, lookupValidator(validationMap) ...
Read more >Migrate CRM Analytics Assets with Change Sets
That is, if you add a dataset to a change set, the associated dataflows are not ... Unlike Apex or other code, the...
Read more >Salesforce Change Sets – Limitations and The Deployment ...
Now that you're familiar with the basic concepts of creating and deploying Change Sets, it is important to be aware of common ChangeSet...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I haven’t forgotten about this; it’ll likely be early next week.
👋 Can you try the function approach? I don’t think it should matter so I’m a bit confused atm.