Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd91433792 | ||
|
|
1f9004eaa3 | ||
|
|
58e6747930 | ||
|
|
4c083856be | ||
|
|
b94522193c |
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "pages"]
|
||||
path = pages
|
||||
url = git@github.com:pivotal/jasmine.git
|
||||
url = https://github.com/pivotal/jasmine.git
|
||||
|
||||
9
.travis.yml
Normal file
9
.travis.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
# before_script:
|
||||
# - "sh -e /etc/init.d/xvfb start"
|
||||
before_install:
|
||||
- "export DISPLAY=:99.0"
|
||||
- "sh -e /etc/init.d/xvfb start"#
|
||||
script: "DISPLAY=:99.0 bundle exec rake jasmine_core_spec"
|
||||
|
||||
rvm:
|
||||
- "1.9.3"
|
||||
8
Gemfile
8
Gemfile
@@ -1,3 +1,11 @@
|
||||
source :rubygems
|
||||
gem "rake"
|
||||
gem "jasmine", git: 'https://github.com/pivotal/jasmine-gem.git'
|
||||
|
||||
unless ENV["TRAVIS"]
|
||||
group :debug do
|
||||
gem 'debugger'
|
||||
end
|
||||
end
|
||||
|
||||
gemspec
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<a name="README">[Jasmine](http://pivotal.github.com/jasmine/)</a>
|
||||
<a name="README">[Jasmine](http://pivotal.github.com/jasmine/)</a> <a title="Build at Travis CI" href="http://travis-ci.org/#!/pivotal/jasmine"><img src="https://secure.travis-ci.org/pivotal/jasmine.png" /></a>
|
||||
|
||||
=======
|
||||
**A JavaScript Testing Framework**
|
||||
|
||||
|
||||
38
Rakefile
38
Rakefile
@@ -41,4 +41,40 @@ desc "View full development tasks"
|
||||
task :list_dev_tasks do
|
||||
puts "Jasmine uses Thor for command line tasks for development. Here is the command set:"
|
||||
system "thor list"
|
||||
end
|
||||
end
|
||||
|
||||
require "jasmine"
|
||||
require 'rspec'
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
desc "Run all examples"
|
||||
RSpec::Core::RakeTask.new(:jasmine_core_spec) do |t|
|
||||
t.pattern = 'spec/jasmine_self_test_spec.rb'
|
||||
end
|
||||
|
||||
namespace :jasmine do
|
||||
task :server do
|
||||
port = ENV['JASMINE_PORT'] || 8888
|
||||
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
|
||||
config = Jasmine.config
|
||||
server = Jasmine::Server.new(8888, Jasmine::Application.app(config))
|
||||
server.start
|
||||
|
||||
puts "your tests are here:"
|
||||
puts " http://localhost:#{port}/"
|
||||
end
|
||||
|
||||
desc "Copy examples from Jasmine JS to the gem"
|
||||
task :copy_examples_to_gem do
|
||||
require "fileutils"
|
||||
|
||||
# copy jasmine's example tree into our generator templates dir
|
||||
FileUtils.rm_r('generators/jasmine/templates/jasmine-example', :force => true)
|
||||
FileUtils.cp_r(File.join(Jasmine::Core.path, 'example'), 'generators/jasmine/templates/jasmine-example', :preserve => true)
|
||||
end
|
||||
end
|
||||
|
||||
desc "Run specs via server"
|
||||
task :jasmine => ['jasmine:server']
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ jasmine.HtmlReporter = function(_doc) {
|
||||
dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
|
||||
dom.alert = self.createDom('div', {className: 'alert'},
|
||||
self.createDom('span', { className: 'exceptions' },
|
||||
self.createDom('label', { className: 'label', for: 'no_try_catch' }, 'No try/catch'),
|
||||
self.createDom('label', { className: 'label', 'for': 'no_try_catch' }, 'No try/catch'),
|
||||
self.createDom('input', { id: 'no_try_catch', type: 'checkbox' }))),
|
||||
dom.results = self.createDom('div', {className: 'results'},
|
||||
dom.summary = self.createDom('div', { className: 'summary' }),
|
||||
|
||||
@@ -2595,6 +2595,6 @@ jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
|
||||
jasmine.version_= {
|
||||
"major": 1,
|
||||
"minor": 3,
|
||||
"build": 0,
|
||||
"revision": 1354052693
|
||||
"build": 1,
|
||||
"revision": 1354556913
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module Jasmine
|
||||
module Core
|
||||
VERSION = "1.3.0"
|
||||
VERSION = "1.3.1"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
2
pages
2
pages
Submodule pages updated: 00ba05c213...dae7b20e1c
39
spec/jasmine.yml
Normal file
39
spec/jasmine.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
jasmine_dir:
|
||||
- 'src'
|
||||
#This 'magic' inclusion order allows the travis build to pass.
|
||||
#TODO: search for the correct files to include to prevent
|
||||
jasmine_files:
|
||||
- 'core/base.js'
|
||||
- 'core/util.js'
|
||||
- 'core/Reporter.js'
|
||||
#end of known dependencies
|
||||
- 'core/Env.js'
|
||||
- 'core/Block.js'
|
||||
- 'core/JsApiReporter.js'
|
||||
- 'core/Matchers.js'
|
||||
- 'core/mock-timeout.js'
|
||||
- 'core/MultiReporter.js'
|
||||
- 'core/NestedResults.js'
|
||||
- 'core/PrettyPrinter.js'
|
||||
- 'core/Queue.js'
|
||||
- 'core/Runner.js'
|
||||
- 'core/Spec.js'
|
||||
- 'core/Suite.js'
|
||||
- 'core/WaitsBlock.js'
|
||||
- 'core/WaitsForBlock.js'
|
||||
- 'html/HtmlReporterHelpers.js'
|
||||
- 'html/HtmlReporter.js'
|
||||
- '**/*.js'
|
||||
jasmine_css_files:
|
||||
- 'html/jasmine.css'
|
||||
src_files:
|
||||
stylesheets:
|
||||
helpers:
|
||||
- 'helpers/**/*.js'
|
||||
spec_files:
|
||||
- '**/*[Ss]pec.js'
|
||||
src_dir:
|
||||
spec_dir:
|
||||
- 'spec'
|
||||
|
||||
|
||||
23
spec/jasmine_self_test_spec.rb
Normal file
23
spec/jasmine_self_test_spec.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
require 'jasmine'
|
||||
|
||||
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
|
||||
config = Jasmine.config
|
||||
server = Jasmine::Server.new(config.port, Jasmine::Application.app(config))
|
||||
driver = Jasmine::SeleniumDriver.new(config.browser, "#{config.host}:#{config.port}/")
|
||||
|
||||
t = Thread.new do
|
||||
begin
|
||||
server.start
|
||||
rescue ChildProcess::TimeoutError
|
||||
end
|
||||
# # ignore bad exits
|
||||
end
|
||||
t.abort_on_exception = true
|
||||
Jasmine::wait_for_listener(config.port, "jasmine server")
|
||||
puts "jasmine server started."
|
||||
|
||||
results_processor = Jasmine::ResultsProcessor.new(config)
|
||||
results = Jasmine::Runners::HTTP.new(driver, results_processor, config.result_batch_size).run
|
||||
formatter = Jasmine::RspecFormatter.new
|
||||
formatter.format_results(results)
|
||||
|
||||
@@ -94,7 +94,7 @@ jasmine.HtmlReporter = function(_doc) {
|
||||
dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
|
||||
dom.alert = self.createDom('div', {className: 'alert'},
|
||||
self.createDom('span', { className: 'exceptions' },
|
||||
self.createDom('label', { className: 'label', for: 'no_try_catch' }, 'No try/catch'),
|
||||
self.createDom('label', { className: 'label', 'for': 'no_try_catch' }, 'No try/catch'),
|
||||
self.createDom('input', { id: 'no_try_catch', type: 'checkbox' }))),
|
||||
dom.results = self.createDom('div', {className: 'results'},
|
||||
dom.summary = self.createDom('div', { className: 'summary' }),
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
jasmine.version_= {
|
||||
"major": 1,
|
||||
"minor": 3,
|
||||
"build": 0,
|
||||
"revision": 1354052693
|
||||
"build": 1,
|
||||
"revision": 1354556913
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"major": 1,
|
||||
"minor": 3,
|
||||
"build": 0
|
||||
"build": 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user