Permalink
Browse files

Remove index.js altogether, along with lib/ dir

  • Loading branch information...
1 parent 3d5d60e commit e050c5647212fe3d3e913141c75f92b337f21ca0 @mdirolf mdirolf committed Feb 5, 2013
Showing with 12 additions and 13 deletions.
  1. +1 −1 README.md
  2. +1 −1 examples/browser/index.html
  3. +0 −1 index.js
  4. +1 −1 package.json
  5. 0 {lib → }/sixpack.js
  6. +9 −9 test/sixpack-test.js
View
@@ -4,7 +4,7 @@ Node / Browser library for SeatGeek's Sixpack AB testing framework.
## Installation
-Include the "lib/sixpack.js" script. The `sixpack` object will be added to your environment. In the browser do the following:
+Include the "sixpack.js" script. The `sixpack` object will be added to your environment. In the browser do the following:
``` html
<script src="sixpack.js"></script>
@@ -1,6 +1,6 @@
<html>
<head>
- <script src="../../lib/sixpack.js" type="text/javascript"></script>
+ <script src="../../sixpack.js" type="text/javascript"></script>
<script type="text/javascript">
function go() {
var session = new sixpack.Session();
View
@@ -1 +0,0 @@
-module.exports = require('./lib/sixpack');
View
@@ -2,7 +2,7 @@
"name": "sixpack-client",
"version": "0.0.3",
"description": "JS client for SeatGeek's Sixpack AB testing framework.",
- "main": "index",
+ "main": "sixpack.js",
"scripts": {
"test": "mocha"
},
File renamed without changes.
View
@@ -4,7 +4,7 @@ var expect = require('chai').expect;
describe("Sixpack", function () {
it("should return an alternative for simple_participate", function (done) {
- var sixpack = require('../index');
+ var sixpack = require('../');
sixpack.simple_participate("show-bieber", ["trolled", "not-trolled"], "mike", function(err, alt) {
if (err) throw err;
expect(alt).to.match(/trolled/);
@@ -13,7 +13,7 @@ describe("Sixpack", function () {
});
it("should auto generate a client_id", function (done) {
- var sixpack = require('../index');
+ var sixpack = require('../');
sixpack.simple_participate("show_bieber", ["trolled", "not-trolled"], function(err, alt) {
if (err) throw err;
expect(alt).to.match(/trolled/);
@@ -22,7 +22,7 @@ describe("Sixpack", function () {
});
it("should return ok for simple_convert", function (done) {
- var sixpack = require('../index');
+ var sixpack = require('../');
sixpack.simple_participate("show-bieber", ["trolled", "not-trolled"], "mike", function(err, alt) {
if (err) throw err;
sixpack.simple_convert("show-bieber", "mike", function(err, alt) {
@@ -34,7 +34,7 @@ describe("Sixpack", function () {
});
it("should return ok for multiple converts", function (done) {
- var sixpack = require('../index');
+ var sixpack = require('../');
sixpack.simple_participate("show-bieber", ["trolled", "not-trolled"], "mike", function(err, alt) {
if (err) throw err;
sixpack.simple_convert("show-bieber", "mike", function(err, alt) {
@@ -50,7 +50,7 @@ describe("Sixpack", function () {
});
it("should not return ok for simple_convert with new id", function (done) {
- var sixpack = require('../index');
+ var sixpack = require('../');
sixpack.simple_convert("show-bieber", "unknown_id", function(err, alt) {
// TODO should this be an err?
if (err) throw err;
@@ -60,7 +60,7 @@ describe("Sixpack", function () {
});
it("should not return ok for simple_convert with new experiment", function (done) {
- var sixpack = require('../index');
+ var sixpack = require('../');
sixpack.simple_convert("show-blieber", "mike", function(err, alt) {
// TODO should this be an err?
if (err) throw err;
@@ -70,7 +70,7 @@ describe("Sixpack", function () {
});
it("should not allow bad experiment names", function (done) {
- var sixpack = require('../index');
+ var sixpack = require('../');
sixpack.simple_participate("%%", ["trolled", "not-trolled"], function(err, alt) {
assert.equal(alt, null);
expect(err).instanceof(Error);
@@ -79,7 +79,7 @@ describe("Sixpack", function () {
});
it("should not allow bad alternative names", function (done) {
- var sixpack = require('../index');
+ var sixpack = require('../');
sixpack.simple_participate("show-bieber", ["trolled"], function(err, alt) {
assert.equal(alt, null);
expect(err).instanceof(Error);
@@ -93,7 +93,7 @@ describe("Sixpack", function () {
});
it("should work without using the simple methods", function (done) {
- var sixpack = require('../index');
+ var sixpack = require('../');
var session = new sixpack.Session();
session.convert("testing", function(err, res) {
if (err) throw err;

0 comments on commit e050c56

Please sign in to comment.