Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a very basic test for Network#export #198

Merged
merged 1 commit into from
Mar 16, 2016
Merged

Conversation

astorije
Copy link
Member

This is a very basic, naive test but my plan was to have the minimal possible coverage rather than an extensive test suite. Will improve over time.

Btw, CI will pass after #197 is merged and this PR is rebased off master.

@astorije astorije added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Mar 16, 2016
network.channels.push(new Chan({name: "#thelounge"}));
network.channels.push(new Chan({name: "&foobar"}));

expect(network.export()).to.deep.equal({
Copy link
Member

Choose a reason for hiding this comment

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

Will this test fail if we add new properties to export?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, on purpose. If changing the behavior or .export(), it must be a conscious choice and therefore the test(s) should be updated :-)

Copy link
Member

Choose a reason for hiding this comment

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

Ah that's fine, the export function picks what entries to export. Confused it with toJSON.

@astorije astorije force-pushed the astorije/test-network-export branch from 22ed0a3 to f35b0df Compare March 16, 2016 12:54
xPaw added a commit that referenced this pull request Mar 16, 2016
Add a very basic test for Network#export
@xPaw xPaw merged commit 0b3696a into master Mar 16, 2016
@xPaw xPaw deleted the astorije/test-network-export branch March 16, 2016 12:58
@astorije astorije added this to the 1.4.0 milestone Oct 8, 2016
@xPaw xPaw removed their assignment Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants