Skip to content

Commit

Permalink
Remove index.js altogether, along with lib/ dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mdirolf committed Feb 5, 2013
1 parent 3d5d60e commit e050c56
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/index.html
@@ -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();
Expand Down
1 change: 0 additions & 1 deletion index.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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"
},
Expand Down
File renamed without changes.
18 changes: 9 additions & 9 deletions test/sixpack-test.js
Expand Up @@ -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/);
Expand All @@ -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/);
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit e050c56

Please sign in to comment.