Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions smoke-tests/scenarios/basic-test.ts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find any place @glimmer/component was tested, so I just added some tests here

Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,37 @@ function basicTest(scenarios: Scenarios, appName: string) {
`,
},
integration: {
'destruction-test.gjs': `
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is passing in 6.7

import { module, test } from 'qunit';
import { render } from '@ember/test-helpers';
import { setupRenderingTest } from 'ember-qunit';

import Component from '@glimmer/component';

class Dropdown extends Component {
willDestroy() {
super.willDestroy();
this.args.onDestroy();
}
}


module('Integration | Component | dropdown', function (hooks) {
setupRenderingTest(hooks);

hooks.after(function (assert) {
assert.verifySteps(['Dropdown destroyed']);
});

test('it calls "@onDestroy"', async function (assert) {
const onDropdownDestroy = () => assert.step('Dropdown destroyed');

await render(
<template><Dropdown @onDestroy={{onDropdownDestroy}} /></template>,
);
});
});
`,
'interactive-example-test.js': `
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
Expand Down
Loading