Skip to content

Releases: fvanwijk/mox

V0.7.1

13 Oct 13:24
Compare
Choose a tag to compare
V0.7.1 Pre-release
Pre-release

Dist folder was not published by accident

V0.6.0

24 Nov 06:48
Compare
Choose a tag to compare
V0.6.0 Pre-release
Pre-release

Removed deprecated helper methods from Mox because they depend on other libs, they are not used a lot or they are not really shorter.

  • mockDate: supported by Jasmine 2
  • getMockData: depends on jasmine-jquery and is not the best method for all situations
  • noop: use angular.noop
  • compileHtmlOnDom: compile appends the compiled html to the DOM by default
  • removeCompiledHtmlFromDom: is done when compile is called
  • defer, when, all: better to inject $q and use its methods
  • restangularPromise: resourcePromise does the same
  • extendElement, extendedElementWithChildren: is replaced by addSelectors, which is better and has more features.

V0.5.1

05 Oct 08:01
Compare
Choose a tag to compare
V0.5.1 Pre-release
Pre-release

Resource mocks now have the $-methods as well, so that they can be used as resource instances again. This is temporarily, because the resource API will be improved soon.

V0.5.0

30 Sep 14:36
Compare
Choose a tag to compare
V0.5.0 Pre-release
Pre-release

Reorganized internal structure:

  • mox.get cache is cleaned after every test.
  • When mocking a service, the original service is not replaced with a spy object (or spy in case of a filter), but we spy on its methods. Memory footprint is increased a bit, but you now can call .andCallThrough on the methods (#9).
  • .andRespond is implemented for Jasmine 2.
  • Transcluded content is not mocked by default when mockDirectives is used (#7).

V0.4.3

18 Aug 12:05
Compare
Choose a tag to compare
V0.4.3 Pre-release
Pre-release

Fixed bug in directives mocking. In Angular 1.3 it was not possible to mock a directive without an isolate scope. Now the directive mocks wil be based in the original directive (and the mock DDO overwrites some properties) instead of based on the mock.

v0.4.2

23 Jul 18:49
Compare
Choose a tag to compare
v0.4.2 Pre-release
Pre-release

Fix bug in mockServices where the methods of services were not extracted because it checked only for functions (such as filters) to extract the methods

v0.4.1

17 Jul 15:04
Compare
Choose a tag to compare
v0.4.1 Pre-release
Pre-release
  • Cleaned up the bower dependencies: ignored dev files and made the dependent versions less strict
  • Using dist/mox.js as main file, so that it is working again with wiredep
  • Copying less DDO properties when mocking a directive mocking, because the DDO is changed in Angular 1.4
  • createMock() can also create mocks for constants (directly or by using setupResults)

v0.4.0

08 Jun 12:44
Compare
Choose a tag to compare
v0.4.0 Pre-release
Pre-release
  • Added addSelectors method to create lazy element selections for your view specs.
  • Added method mox.inject() to inject services without the need of a inject function wrapper.
  • mox.module now supports multiple module names and the parameter order is not relevant anymore
  • Finally added specs, so some small bugs are fixed.
  • Deprecated a lot of methods that are barely used or replaced by better ones.

v0.3.3

20 Apr 09:39
Compare
Choose a tag to compare
v0.3.3 Pre-release
Pre-release
  • Mock constants using mox.mockConstants()
  • Appending compiled and linked elements to document.body or the the template defined in mox.testTemplatePath
  • $scope that is created with createScope and the compiled element is set on the currentSpec, so that you can access the created scope/element in the spec by calling this.scope/this.element.
  • $scope argument is optional when calling createController, compileHtml or compileTemplate. The scope on the currentSpec is used instead.

v0.3.2

17 Mar 13:29
Compare
Choose a tag to compare
v0.3.2 Pre-release
Pre-release
  • Added dependency on jasmine-mox-matchers
  • Passing an array with mock names is not allowed anymore. Just pass multiple arguments
  • .mockController is renamed to .mockControllers
  • Return values of createScope, compileHtml and compileTemplate are set on the currentSpec so you can access it via this.$scope and this.element
  • Do not clear the jQuery cache (done by angular-mocks in some older versions) because that makes impossible to compile element in beforeAll for reuse by .toContainIsolateScope matcher and events.