Skip to content

Commit

Permalink
fix ember-data test data stubbing
Browse files Browse the repository at this point in the history
Using /public doesn't work without more config using testem.
  • Loading branch information
ef4 committed Feb 10, 2022
1 parent e29b906 commit ad08f5f
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions tests/scenarios/static-app-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ appScenarios

merge(project.files, {
app: {
adapters: {
'post.js': `
import JSONAPIAdapter from '@ember-data/adapter/json-api';
export default class PostAdapter extends JSONAPIAdapter {
findRecord(store, type, id, snapshot) {
return { data: { type: 'posts', id: '0 ', attributes: { title: 'Hello world' } } };
}
}
`,
},
components: {
'fancy-box.js': `
import Component from '@glimmer/component';
Expand Down Expand Up @@ -139,19 +149,6 @@ appScenarios
});
`,
},
public: {
posts: {
'0': JSON.stringify({
data: {
type: 'posts',
id: '0 ',
attributes: {
title: 'Hello world',
},
},
}),
},
},
tests: {
acceptance: {
'components-example-test.js': `
Expand Down

0 comments on commit ad08f5f

Please sign in to comment.