Skip to content

Commit

Permalink
Merge commit 'b94ad8741909b8a48521d168a1ae6b742180122e'
Browse files Browse the repository at this point in the history
* commit 'b94ad8741909b8a48521d168a1ae6b742180122e': (77 commits)
  2.0.3
  fix velesin#179
  fix style
  fix toEqual() examples (velesin#176)
  Providing the parameters from jqXHR.fail
  2.0.2
  Update fixture to ignore script tag without src attribute
  Documentation fix
  2.0.1
  Run tests with jquery 2
  Update ajax call to work with jquery 2
  Update dependencies for jasmine v2 (close velesin#166)
  Fix matchers to be in alphabetical order and add toBeInDOM
  Update README docs for v2 (velesin#154)
  v2.0.0 - adds support for jasmine v2 (fix velesin#154, fix velesin#164)
  Update grunt-contrib-jasmine
  Run tests off of jasmine v2.0.0-rc3
  Able to bind events to fixtures
  Pass in window to the self invoking function
  1.7.0
  ...
  • Loading branch information
r4j4h committed May 13, 2014
2 parents 06898b1 + b94ad87 commit 29a989f
Show file tree
Hide file tree
Showing 22 changed files with 9,851 additions and 13,578 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
lib/external
.idea
lib-cov
.grunt
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz

pids
logs
results

npm-debug.log
node_modules
55 changes: 55 additions & 0 deletions .issues-guidelines.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
var assert = require('assert');

module.exports = {

'pull-requests': {
'should always be made from feature branches': function (pull) {
assert.notEqual(pull.head.ref, 'master')
},

'should always include a unit test if changing js files': function (pull) {
var hasJS = false
var hasTests = false

pull.files.forEach(function (file) {
if (/^lib\/[^./]+.js/.test(file.filename)) hasJS = true
if (/^spec\/suites\/[^.]+.js/.test(file.filename)) hasTests = true
})

assert.ok(!hasJS || hasJS && hasTests)
},

'after': function (pull) {
if (pull.reporter.stats.failures) {
pull.reportFailures(pull.close.bind(pull))
}
}

},

'issues': {

'before': function (issue) {
var plus = {}

issue.comments.forEach(function (comment) {
if (/\+1/.test(comment.body)) plus[comment.user.login] = true
})

if (Object.keys(plus) > 10) issue.tag('popular')
},

'should include a jsfiddle/jsbin illustrating the problem if tagged with js but not a feature': function (issue) {
var labels = issue.labels.map(function (label) { return label.name });
if (~labels.indexOf('js') && !~labels.indexOf('feature')) assert.ok(/(jsfiddle|jsbin)/.test(issue.body))
},

'after': function (issue) {
if (issue.reporter.stats.failures) {
issue.reportFailures(issue.close.bind(issue))
}
}

}

}
16 changes: 16 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"validthis" : true
, "multistr" : true
, "laxcomma" : true
, "laxbreak" : true
, "browser" : true
, "eqeqeq" : false
, "eqnull" : true
, "debug" : true
, "devel" : true
, "curly" : false
, "boss" : true
, "expr" : true
, "asi" : true
, "supernew" : true
}
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- 0.8
before_script:
- npm install -g grunt-cli
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing to Jasmine-jQuery

Looking to contribute something to Jasmine-jQuery? **Here's how you can help.**

## Reporting issues

We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Jasmine-jQuery. Please read the following guidelines before opening any issue.

1. **Search for existing issues.** Somemeone else may have reported the same issue. Moreover, the issue may have already been resolved with a fix available.
2. **Create an isolated and reproducible test case.** Be sure the problem exists in Jasmine-jQuery's code with a [reduced test case](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report.
3. **Include a live example.** Make use of jsFiddle or jsBin to share your isolated test cases.
4. **Share as much information as possible.** Include operating system and version, browser and version, version of Jasmine-jQuery. Also include steps to reproduce the bug.

## Pull requests

- Try not to pollute your pull request with unintended changes--keep them simple and small
- Please squash your commits when appropriate. This simplifies future cherry picks, and also keeps the git log clean.
- Include tests that fail without your code, and pass with it.
- Update the documentation, examples elsewhere, and the guides: whatever is affected by your contribution.
- If you can, have another developer sanity check your change.

## Coding standards

- No semicolons
- Comma first
- 2 spaces (no tabs)
- strict mode
- "Attractive"
33 changes: 33 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* jshint node: true */

module.exports = function (grunt) {
"use strict";

grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
, jshint: {
all: [
"Gruntfile.js"
, "lib/**/*.js"
, "spec/**/*.js"
]
, options: {
jshintrc: '.jshintrc'
},
}
, jasmine: {
src: "lib/**/*.js"
, options: {
specs: "spec/**/*.js"
, vendor: "vendor/**/*.js"
, version: '2.0.0'
}
}
})

grunt.loadNpmTasks('grunt-contrib-jshint')
grunt.loadNpmTasks('grunt-contrib-jasmine')

grunt.registerTask('test', ['jshint', 'jasmine'])
grunt.registerTask('default', ['test'])
};
64 changes: 53 additions & 11 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,57 @@

This is an overview and may be incomplete. /~https://github.com/velesin/jasmine-jquery/commits/master is where to see everything.

## v2.0.3 (2014-02-49)

- fix: xhr failure requests (#174)

## v2.0.2 (2014-01-23)

- fix: don't load inline js in fixtures (for templates, etc.)

## v2.0.1 (Jan 14, 2014)

- fix: ajax call to work with jquery 2

## v2.0.0 (Jan 13, 2014)

Due to limitations with jasmine 2, e.g. not being able to add behavior to built-in matchers, there are some api changes in jasmine-jquery. Bug the jasmine maintainers to make modifying matchers possible again.

- change: `toContain($el)` is now `toContainElement($el)`
- change: `toBe($el/selector)` is now `toEqual($el/selector)`
- add: support for jasmine v2


## v1.7.0 (Dec 27, 2013)
- add: toBeInDOM() matcher

## v1.60 (Dec 22, 2013)
- fix: usages of jQuery to use $ (#159)
- change namespace to be jasmine.jQuery

## v1.5.93 (Nov 15, 2013)
- fix: check strict equality in `hasProperty`

## v1.5.92 (Oct 22, 2013)
- fix: cloning radio buttons maintains their checked value

## v1.5.91 (Oct 1, 2013)
- fix: caching json data fixtures (#149)

## v1.5.9 (Sept 25, 2013)
- fix: throw error when loading a fixture that doesn't exist (#146)
- fix: toHaveCss() to support expecting a css property be auto (#147)
- fix: toExist() for objects outside of the DOM (#64, #148)

## v1.5.1 (April 26, 2013)
- adds matcher for jQuery's event.stopPropagation()
- adds toHaveLength matcher
- adds toContainText matcher
- adds toHaveBeenTriggeredOnAndWith
- stop toHaveValue from coercing types
- fix ajax call that was breaking JSONFixture
- fix loadStyleFixtures in IE8
- makes toBeFocused compatible with PhantomJS
- updates jQuery to 1.9
- performance improvements
- other minor fixes
- add: matcher for jQuery's event.stopPropagation()
- add: toHaveLength() matcher
- add: toContainText() matcher
- add: toHaveBeenTriggeredOnAndWith()
- fix: stop toHaveValue from coercing types
- fix: ajax call that was breaking JSONFixture
- fix: loadStyleFixtures() in IE8
- fix: make toBeFocused() compatible with PhantomJS
- fix: update jQuery to 1.9
- fix: performance improvements
- fix: other minor fixes
2 changes: 1 addition & 1 deletion MIT.LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2010, 2011, 2012 Wojciech Zawistowski, Travis Jeffery
Copyright (c) 2010-2014 Wojciech Zawistowski, Travis Jeffery

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
Loading

0 comments on commit 29a989f

Please sign in to comment.